question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

typescript transpiler errors

See original GitHub issue

Is it anyhow possible to get rid of the typescript errors caused by Angular2Apollo?

ERROR in [default] /Users/.../app-angular2/node_modules/angular2-apollo/build/src/Angular2Apollo.d.ts:1:0 
Cannot find type definition file for 'typed-graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/angular2-apollo/build/src/Angular2Apollo.d.ts:5:35 
Cannot find module 'graphql'.

also apollo-client is throwing a lot of typescript transpilation errors:

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/ApolloClient.d.ts:1:0 
Cannot find type definition file for 'chai'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/actions.d.ts:1:0 
Cannot find type definition file for 'typed-graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/actions.d.ts:3:0 
Cannot find type definition file for 'chai'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/actions.d.ts:4:40 
Cannot find module 'graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/core/ObservableQuery.d.ts:1:0 
Cannot find type definition file for 'chai'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/core/QueryManager.d.ts:1:0 
Cannot find type definition file for 'typed-graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/core/QueryManager.d.ts:3:0 
Cannot find type definition file for 'chai'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/core/QueryManager.d.ts:8:25 
Cannot find module 'graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/core/watchQueryOptions.d.ts:1:0 
Cannot find type definition file for 'typed-graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/core/watchQueryOptions.d.ts:2:0 
Cannot find type definition file for 'chai'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/core/watchQueryOptions.d.ts:4:45 
Cannot find module 'graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/data/extensions.d.ts:1:0 
Cannot find type definition file for 'chai'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/data/mutationResults.d.ts:1:0 
Cannot find type definition file for 'typed-graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/data/mutationResults.d.ts:2:0 
Cannot find type definition file for 'chai'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/data/mutationResults.d.ts:4:40 
Cannot find module 'graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/data/readFromStore.d.ts:1:0 
Cannot find type definition file for 'typed-graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/data/readFromStore.d.ts:2:0 
Cannot find type definition file for 'chai'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/data/readFromStore.d.ts:3:25 
Cannot find module 'graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/data/scopeQuery.d.ts:1:0 
Cannot find type definition file for 'typed-graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/data/scopeQuery.d.ts:3:29 
Cannot find module 'graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/data/storeUtils.d.ts:1:0 
Cannot find type definition file for 'typed-graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/data/storeUtils.d.ts:2:0 
Cannot find type definition file for 'chai'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/data/storeUtils.d.ts:3:64 
Cannot find module 'graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/data/writeToStore.d.ts:1:0 
Cannot find type definition file for 'chai'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/data/writeToStore.d.ts:2:0 
Cannot find type definition file for 'typed-graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/data/writeToStore.d.ts:4:39 
Cannot find module 'graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/errors/ApolloError.d.ts:2:0 
Cannot find type definition file for 'typed-graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/errors/ApolloError.d.ts:3:29 
Cannot find module 'graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/fragments.d.ts:1:0 
Cannot find type definition file for 'typed-graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/fragments.d.ts:2:45 
Cannot find module 'graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/mutations/store.d.ts:1:0 
Cannot find type definition file for 'chai'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/mutations/store.d.ts:3:0 
Cannot find type definition file for 'typed-graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/mutations/store.d.ts:5:29 
Cannot find module 'graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/queries/getFromAST.d.ts:1:0 
Cannot find type definition file for 'typed-graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/queries/getFromAST.d.ts:2:66 
Cannot find module 'graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/queries/store.d.ts:1:0 
Cannot find type definition file for 'chai'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/queries/store.d.ts:3:0 
Cannot find type definition file for 'typed-graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/queries/store.d.ts:5:43 
Cannot find module 'graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/transport/batchedNetworkInterface.d.ts:2:0 
Cannot find type definition file for 'typed-graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/transport/batchedNetworkInterface.d.ts:3:30 
Cannot find module 'graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/transport/networkInterface.d.ts:1:0 
Cannot find type definition file for 'typed-graphql'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/transport/networkInterface.d.ts:2:0 
Cannot find type definition file for 'chai'.

ERROR in [default] /Users/.../app-angular2/node_modules/apollo-client/transport/networkInterface.d.ts:5:40 
Cannot find module 'graphql'.

@Urigo wouldn’t it make sense to include typed-graphql into angular2-apollo to avoid this errors?

Similar discussions are on apollo-client:

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
kamilkisielacommented, Nov 15, 2016

@schickling Right now, TS adds @types/chai to the distributed files, it’s not apollo specific, it’s a known issue with TypeScript and it will be fixed with 2.1. I can’t find an issue about it, will look for it later today.

0reactions
manuelfinkcommented, Jan 1, 2017

Seems ok, not having issues with 0.8 any more.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeScript compile error due to typings
What's the compiler doing in node_modules/angular2 directory since I excluded it in tsconfig.json. Its looking at npm modules becuase of ...
Read more >
Documentation - tsc CLI Options
Flag Type Default ‑‑allowJs boolean false ‑‑allowUmdGlobalAccess boolean false ‑‑allowUnreachableCode boolean
Read more >
Understanding TypeScript Errors for Beginners
Another common mistake amongst TypeScript beginners is to assume that because there are no compile-time errors there will be no run-time errors.
Read more >
Detect JavaScript errors during compile time using ...
During compile-time TypeScript can emit errors to a terminal, and does not allow compiling of a code at all.
Read more >
Compile error for TypeScript projects that transpile to ES5
The polyfills are loaded manually, and transpilation is performed by the TypeScript compiler instead of Babel. Our build configuration does not ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found