Meteor: Cannot find module 'angular' - node.js

I'm newbie on Meteor.
After one week on it, and started by implementing the todo of the tutorial as describe here, every things was good locally.
just the fact that I'm continually trying to deploy it, but my heroku
link(https://tasktor.herokuapp.com) just show a blank page with
the this error in de debugger:
Error: angular#^1.2.27 not installed. tmeasday_check-npm-versions.js:66:11
Error: Cannot find module 'angular'
Note that everything is clean on http://localhost:3000.
Already try a lot of solutions, as:
meteor add angular
meteor npm install --save angular
Disable minification of Js and Css.
This is the repository of this app deployed to heroku: https://github.com/dassiorleando/tasktor
his buildpack: https://github.com/dassiorleando/heroku-buildpack-meteor,
it is a buildpack with an updated Node Engine(4.5.0), that allowed to run an app with the meteor 1.4.X version.
Knowing that I add Angular-Material after finish this tutorial, because I wanted to have a clean material design style on my todo. You can check the repository to look about.
How can I handle this situation ?
Thanks in advance.

Doing this:
meteor add angular
Adds an old atmosphere angular-meteor package, which also refers to an old (1.2.27) version of angular. The best way to proceed is to remove this and just use angular npm packages. You will need these packages
pbastowski:angular-babel
urigo:static-templates
dotansimha:accounts-ui-angular
The last one is if you are using the accounts package.
The tutorial at https://www.angular-meteor.com/tutorials/socially/angular1/bootstrapping recommends this:
So let's remove it by running:
$ meteor remove blaze-html-templates
$ meteor remove ecmascript
Now let's add the Angular 1 package to Meteor, back in the command
line, launch this command:
$ meteor npm install --save angular angular-meteor babel-runtime
$ meteor add angular-templates pbastowski:angular-babel
That's it! Now we can use Angular 1's power in our Meteor app.

Related

Creating angular app in preferred version

I'm new to angular.
I'm creating an angular app using
ng new <app name>
but here I don't know how to specify the angular version and I don`t know how to check the angular version of the created app.
Can anyone help me in finding a solution for this.
You can find the angular version in your package.json file:
You can also change the version of all or of specific packages here, and then rerun npm install to install your specified version.
In package.json of your project you will find the current angular version you are using it in your project.
Also you can go through below link for knowing much in details
https://angular.io/guide/quickstart

Angular2 development Without node and npm

I am new angular2 development, and what i came to know is before starin the angular2 development, I must install the nodejs for server and npm to download dependencies from official documentation.
I succesfully deployed the source code in tomcat sever[by build]
So my Question is after installation and creating the new project, i got node_modules. By using these node_modules(can i start development of angular2 on another i.e a new machine where node & npm is not installed)
Basically my question is.. I want to start development of angular2 by using the project structure on new machine. Without the installation on node & npm
From Angular docs
Node.js and npm are essential to Angular development.
If you built/compiled the app and have all the modules installed (you have your node_modules) folder then its just javascript and html which you can run on any server you want.
For npm, if you need any modules/packages, I think you can manually download the package and add it to your development environment. But what if the process needs to be automated? You can't just sit there and download all the packages from github. So npm is really helpful when it come to this. You only need a file containing all dependencies, and run it at build time (package.json)
About nodejs, nodejs allows you to run javascript on the server when you need any interaction with the database. So why don't we just go with the easy way?

Apollo with Angular Quickstart : Unknown error

I am a complete newbie in web development, and I am completely lost.
I want to develop a web application with a backend developed with Django, and a frontend developed with Angular. I want the interaction between the backend and the frontend to be accomplished with Apollo and GraphQL.
Taking this into account, I started developing a couple of simple models in Django, and doing some queries with the Python package graphene. It seems to be working well, so now I tried to develop a simple Angular application that renders the instances of the Django created models.
And that is where I am stuck. I have downloaded the Angular Quickstart used in the Angular tutorial (https://github.com/angular/quickstart) to start testing Apollo. I have run the following commands in the terminal:
$ git clone https://github.com/angular/quickstart.git
$ cd quickstart
$ npm install
Furthermore, to install Apollo, I have run the following commands:
$ npm install whatwg-fetch apollo-client apollo-angular graphql-tag --save
Finally, to run the local server, I typed $ npm start in the terminal. And that is where the following error is raised:
node_modules/#types/isomorphic-fetch/index.d.ts(8,30): error TS2304: Cannot find name 'fetch'.
I am getting mad trying to solve this issue, and I have not found any documentation on this, maybe because I do not have an extensive background on web development.
I am using node v6.10.3, npm v3.10.10 and Ubuntu 16.04 LTS. Any advice or help to solve the problem would be appreciated, thanks.
you have a problem with typings, try installing #types/whatwg-fetch.
The release of #types/isomorphic-fetch you have installed (one of the deps of apollo-client) assumes that you have a declaration of window.fetch.
The ~2.3 version of TypeScript has that definition in dom library and I think this is why Apollo and #types/isomorphic-fetch decided to work this way.
There are two solutions:
Install #types/whatwg-fetch package (or different) or define fetch by yourself
Update TypeScript to 2.3.X (and have dom specified in compilerOptions.lib

How To Run Redux Example Todo List on NodeJS

i found example app on Redux documentation here http://rackt.org/redux/docs/basics/ExampleTodoList.html .
But have one question how to run it on nodejs server and preview the results on browser
Is beter if using expressjs as framework without using express generator.
package.json there has all the packages requirements
use npm install to install all dependencies and then npm start
https://github.com/kweiberth/react-redux-todo-demo - This will come in handy for you - it isn't mine though.
Just copy the repo and get started.

Can't build my web application when integrating bootstrap template

I'm totally new to Node.js meteor and all development outside of visual studio.
When I go in the console and add bootstrap like this :
npm install twitter-bootstrap
It gets installed and adds all the bootstrap files in my solution but when I run my application with meteor it says
Process finished with exit code 254
No more information. No errors. If I delete all the bootstrap files, it builds and run just fine. Any idea what might be causing this?
I've tried looking for the exit code meaning but I can't find it for my IDE and I'm a bit clueless as for why simply adding those packages without even referencing them anywhere in the project might cause my application not to run at all.
You can't add npm packages in your project folder like that. It will create a node_modules sub-directory that meteor will treat like any other project folder, i.e., it will interpret all the files in it. That's not what you want. Either do the npm install in a super-directory, or, better yet, use the meteor meteorhacks:npm package (https://atmospherejs.com/meteorhacks/npm):
meteor add meteorhacks:npm
and then add the npm dependency to your packages.json file.
{
"twitter-bootstrap": "2.1.1"
}
But the real question is: why do you need this package? bootstrap3 is already part of the standard meteor packages, i.e., you already have full access to bootstrap, incl. javascript.
You can use atmosphere meteor packages called mizzao:bootstrap-3 by running the commend
meteor add mizzoa:bootstrap-3
Alternatively if you want to use npm packages you must add meteorhacks:npm packages.
meteor add meteorhacks:npm
npm install twitter-bootstrap
You can specify all the required npm packages inside a packages.json file.
{
"gm":"1.16.0",
"twitter":"0.2.12",
"twitter-bootstrap":"2.1.1",
}

Resources