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
Related
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?
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.
Im very very new in NodeJS
I want to ask about installing and using it in my Project..
I've installed nodejs in my Windows, but I have no idea how to make it works in my Cordova/Phonegap Project. I want to install this module in my project node-gcm. it said I just have to execute npm install node-gcm --save but I dont know where should I execute that command so I tried executed it on my project root (/www). After that I tried the example application code to use it but It said that require is not defined. Can anyone tell me how to fix this?
You need to learn nodejs properly to use in your project. I would recommend the below site could be a good starting point for you which covers all the basics.
http://www.tutorialspoint.com/nodejs/
You are getting that error because, when you look at the package.json file of the node-gcm package, you will notice the dependencies mentioned as,
If you are a windows user, you need to get into your node_modules directory by giving cd node_modules command in your command line and then just issue this command npm install which will install all the required packages.
Hope this helps!.
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.
I can't get a version of the Breeze Zza sample application to work (with Node, Express, Mongodb). I've tried running the provided sample, as well as digging out a later version from github but so far no joy.
The Zza version provided from the page http://www.breezejs.com/samples/zza (follow the link "Download the Sample") is non-functional. At first, it fails with an error indicating that express no longer has a configure() method and after fixing that, it then struggles with invalid middleware requests like express.favicon().
This is due to the instructions (and the package.json) now causing Express 4.x to be installed instead of Express 3.x since the build requests the latest version by default.
I wonder if the link ought to be updated to point instead to a Zip derived from github, where the package.json explicitly pins the Express version to 3.x ... https://github.com/IdeaBlade/Breeze/tree/90c2bbb4b0722c3bb99931940f809844f9c87042/Samples_Unpublished/Zza/Zza.ExpressServer
Anyone know how I should get a working version of the sample app?
For Debian Wheezy, with access to Jessie packages I did the following to install and configure the sample from the Zza.ExpressServer folder provided in github, but I still have a problem, with the server, once launched, reporting "Cannot get /". Still it's progress compared to no server launching at all.
Install nodejs nodejs-legacy, npm and mongodb (I do this by having apt-pinned jessie repositories), but there's many ways to do it. Go to a suitable working directory and put Zza.ExpressServer there...
cd Zza.ExpressServer
npm install
npm install mongodb # this seems to have been forgotten in the new package.json
sudo service mongodb stop
sudo unzip data/ZzaMongoDb.zip -d /var/lib/mongodb
sudo chown mongodb:nogroup /var/lib/mongodb/zza.*
sudo service mongodb start
node server