Error with Typescript 2
See original GitHub issue- Node v4.2.2
- npm v3.10.6
- Typescript v2.0.3
[01:07:07| euskadi31 :~/Projects/acme > npm start
> acme@1.0.0 start /Users/euskadi31/Projects/acme
> tsc && concurrently "tsc -w" "lite-server"
node_modules/apollo-client/ObservableQuery.d.ts(1,1): error TS2688: Cannot find type definition file for 'chai'.
node_modules/apollo-client/QueryManager.d.ts(1,1): error TS2688: Cannot find type definition file for 'typed-graphql'.
node_modules/apollo-client/QueryManager.d.ts(2,1): error TS2688: Cannot find type definition file for 'node'.
node_modules/apollo-client/QueryManager.d.ts(3,1): error TS2688: Cannot find type definition file for 'chai'.
node_modules/apollo-client/QueryManager.d.ts(9,60): error TS2307: Cannot find module 'graphql'.
node_modules/apollo-client/actions.d.ts(1,1): error TS2688: Cannot find type definition file for 'typed-graphql'.
node_modules/apollo-client/actions.d.ts(2,1): error TS2688: Cannot find type definition file for 'node'.
node_modules/apollo-client/actions.d.ts(3,1): error TS2688: Cannot find type definition file for 'chai'.
node_modules/apollo-client/actions.d.ts(4,65): error TS2307: Cannot find module 'graphql'.
node_modules/apollo-client/afterware.d.ts(1,1): error TS2688: Cannot find type definition file for 'isomorphic-fetch'.
node_modules/apollo-client/afterware.d.ts(3,15): error TS2304: Cannot find name 'IResponse'.
node_modules/apollo-client/afterware.d.ts(4,14): error TS2304: Cannot find name 'RequestInit'.
node_modules/apollo-client/data/extensions.d.ts(1,1): error TS2688: Cannot find type definition file for 'chai'.
node_modules/apollo-client/data/mutationResults.d.ts(1,1): error TS2688: Cannot find type definition file for 'typed-graphql'.
node_modules/apollo-client/data/mutationResults.d.ts(2,1): error TS2688: Cannot find type definition file for 'chai'.
node_modules/apollo-client/data/mutationResults.d.ts(4,65): error TS2307: Cannot find module 'graphql'.
node_modules/apollo-client/data/readFromStore.d.ts(1,1): error TS2688: Cannot find type definition file for 'typed-graphql'.
node_modules/apollo-client/data/readFromStore.d.ts(2,1): error TS2688: Cannot find type definition file for 'chai'.
node_modules/apollo-client/data/readFromStore.d.ts(3,40): error TS2307: Cannot find module 'graphql'.
node_modules/apollo-client/data/scopeQuery.d.ts(1,1): error TS2688: Cannot find type definition file for 'typed-graphql'.
node_modules/apollo-client/data/scopeQuery.d.ts(3,30): error TS2307: Cannot find module 'graphql'.
node_modules/apollo-client/data/writeToStore.d.ts(1,1): error TS2688: Cannot find type definition file for 'chai'.
node_modules/apollo-client/data/writeToStore.d.ts(2,1): error TS2688: Cannot find type definition file for 'typed-graphql'.
node_modules/apollo-client/data/writeToStore.d.ts(4,40): error TS2307: Cannot find module 'graphql'.
node_modules/apollo-client/errors.d.ts(1,1): error TS2688: Cannot find type definition file for 'node'.
node_modules/apollo-client/errors.d.ts(2,1): error TS2688: Cannot find type definition file for 'typed-graphql'.
node_modules/apollo-client/errors.d.ts(3,30): error TS2307: Cannot find module 'graphql'.
node_modules/apollo-client/index.d.ts(1,1): error TS2688: Cannot find type definition file for 'typed-graphql'.
node_modules/apollo-client/index.d.ts(2,1): error TS2688: Cannot find type definition file for 'chai'.
node_modules/apollo-client/index.d.ts(4,46): error TS2307: Cannot find module 'graphql'.
node_modules/apollo-client/middleware.d.ts(1,1): error TS2688: Cannot find type definition file for 'isomorphic-fetch'.
node_modules/apollo-client/middleware.d.ts(5,14): error TS2304: Cannot find name 'RequestInit'.
node_modules/apollo-client/mutations/store.d.ts(1,1): error TS2688: Cannot find type definition file for 'chai'.
node_modules/apollo-client/mutations/store.d.ts(2,1): error TS2688: Cannot find type definition file for 'node'.
node_modules/apollo-client/mutations/store.d.ts(3,1): error TS2688: Cannot find type definition file for 'typed-graphql'.
node_modules/apollo-client/mutations/store.d.ts(5,30): error TS2307: Cannot find module 'graphql'.
node_modules/apollo-client/networkInterface.d.ts(1,1): error TS2688: Cannot find type definition file for 'typed-graphql'.
node_modules/apollo-client/networkInterface.d.ts(2,1): error TS2688: Cannot find type definition file for 'chai'.
node_modules/apollo-client/networkInterface.d.ts(3,1): error TS2688: Cannot find type definition file for 'isomorphic-fetch'.
node_modules/apollo-client/networkInterface.d.ts(5,41): error TS2307: Cannot find module 'graphql'.
node_modules/apollo-client/networkInterface.d.ts(34,12): error TS2304: Cannot find name 'RequestInit'.
node_modules/apollo-client/networkInterface.d.ts(42,14): error TS2304: Cannot find name 'RequestInit'.
node_modules/apollo-client/networkInterface.d.ts(45,15): error TS2304: Cannot find name 'IResponse'.
node_modules/apollo-client/networkInterface.d.ts(46,14): error TS2304: Cannot find name 'RequestInit'.
node_modules/apollo-client/networkInterface.d.ts(52,12): error TS2304: Cannot find name 'RequestInit'.
node_modules/apollo-client/networkInterface.d.ts(55,37): error TS2304: Cannot find name 'RequestInit'.
node_modules/apollo-client/networkInterface.d.ts(58,77): error TS2304: Cannot find name 'IResponse'.
node_modules/apollo-client/networkInterface.d.ts(65,12): error TS2304: Cannot find name 'RequestInit'.
node_modules/apollo-client/networkInterface.d.ts(68,110): error TS2304: Cannot find name 'RequestInit'.
node_modules/apollo-client/queries/getFromAST.d.ts(1,1): error TS2688: Cannot find type definition file for 'typed-graphql'.
node_modules/apollo-client/queries/getFromAST.d.ts(2,67): error TS2307: Cannot find module 'graphql'.
node_modules/apollo-client/queries/queryTransform.d.ts(1,1): error TS2688: Cannot find type definition file for 'typed-graphql'.
node_modules/apollo-client/queries/queryTransform.d.ts(2,40): error TS2307: Cannot find module 'graphql'.
node_modules/apollo-client/queries/store.d.ts(1,1): error TS2688: Cannot find type definition file for 'chai'.
node_modules/apollo-client/queries/store.d.ts(2,1): error TS2688: Cannot find type definition file for 'node'.
node_modules/apollo-client/queries/store.d.ts(3,1): error TS2688: Cannot find type definition file for 'typed-graphql'.
node_modules/apollo-client/queries/store.d.ts(6,44): error TS2307: Cannot find module 'graphql'.
node_modules/apollo-client/util/Observable.d.ts(1,1): error TS2688: Cannot find type definition file for 'node'.
node_modules/apollo-client/watchQueryOptions.d.ts(1,1): error TS2688: Cannot find type definition file for 'typed-graphql'.
node_modules/apollo-client/watchQueryOptions.d.ts(2,1): error TS2688: Cannot find type definition file for 'chai'.
node_modules/apollo-client/watchQueryOptions.d.ts(3,46): error TS2307: Cannot find module 'graphql'.
npm ERR! Darwin 15.6.0
npm ERR! argv "/Users/euskadi31/.nvm/versions/node/v4.2.2/bin/node" "/Users/euskadi31/.nvm/versions/node/v4.2.2/bin/npm" "start"
npm ERR! node v4.2.2
npm ERR! npm v3.10.6
npm ERR! code ELIFECYCLE
npm ERR! acme@1.0.0 start: `tsc && concurrently "tsc -w" "lite-server" `
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the acme@1.0.0 start script 'tsc && concurrently "tsc -w" "lite-server" '.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the acme package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! tsc && concurrently "tsc -w" "lite-server"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs acme
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls acme
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/euskadi31/Projects/acme/npm-debug.log
[01:07:19| euskadi31 :~/Projects/acme >
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Documentation - Understanding Errors - TypeScript
Whenever TypeScript finds an error, it tries to explain what went wrong in as much detail as possible. Because its type system is...
Read more >TypeScript errors and how to fix them
A list of common TypeScript errors and how to fix them. ... 2 3, export function getName(firstName: string, lastName?: string = 'Doe'): string...
Read more >TypeScript error TS1005: ';' expected (II) - Stack Overflow
1. Possible duplicate of TypeScript error: ';' expected when using "let" keyword. – jonrsharpe. Sep 25, 2017 at 6:47 · No. This is...
Read more >How to Avoid the Infamous "Cannot read properties of ... - Bitovi
With TypeScript, there are two ways of interpreting null and undefined types ... "Cannot read properties of undefined" Error with TypeScript ...
Read more >Typescript Type System: How Does it Really Work? Type ...
Property 'lessonCount' is missing in type 'Named'. So as we can see in the error message, the two types are not compatible because...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had the same problem with an Angular 2 project.
Until something happens on that front, it helps to add the following to your devDependencies:
And remove graphql-tag from dependencies.
@ValentinKlinghammer I followed your way to solve it, but there are still some errors:
"@types/chai": "^3.4.34", "@types/isomorphic-fetch": "0.0.30", "typed-graphql": "^1.0.1",
I use angular cli to build Angular2 APP, the error is as below: `ERROR in /git/cm-worth/node_modules/apollo-client/transport/afterware.d.ts (4,15): Cannot find name ‘Response’.
ERROR in /git/cm-worth/node_modules/apollo-client/transport/afterware.d.ts (11,16): Cannot find name ‘Response’.
ERROR in /git/cm-worth/node_modules/apollo-client/transport/batchedNetworkInterface.d.ts (11,16): Cannot find name ‘Response’.
ERROR in /git/cm-worth/node_modules/apollo-client/transport/networkInterface.d.ts (46,15): Cannot find name ‘Response’.
ERROR in /git/cm-worth/node_modules/apollo-client/transport/networkInterface.d.ts (63,77): Cannot find name ‘Response’. webpack: Failed to compile.`