Friday, 19 May 2017

Apollo Client 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 TLS. Any advice or help to solve the problem would be appreciated, thanks.



via GLR

No comments:

Post a Comment