`@apollo/client@3.4.10` produces `error TS2688: Cannot find type definition for 'zen-observable'`
See original GitHub issueIntended outcome:
Upgrading application from @apollo/client@3.4.9
to 3.4.10
should work without error.
Actual outcome: Building or linting application produces:
Error: node_modules/@apollo/client/core/ApolloClient.d.ts:1:23 - error TS2688: Cannot find type definition file for 'zen-observable'.
1 /// <reference types="zen-observable" />
~~~~~~~~~~~~~~
Error: node_modules/@apollo/client/core/ObservableQuery.d.ts:1:23 - error TS2688: Cannot find type definition file for 'zen-observable'.
1 /// <reference types="zen-observable" />
~~~~~~~~~~~~~~
Error: node_modules/@apollo/client/core/QueryInfo.d.ts:1:23 - error TS2688: Cannot find type definition file for 'zen-observable'.
1 /// <reference types="zen-observable" />
~~~~~~~~~~~~~~
Error: node_modules/@apollo/client/core/QueryInfo.d.ts:22:24 - error TS2503: Cannot find namespace 'ZenObservable'.
22 subscriptions: Set<ZenObservable.Subscription>;
~~~~~~~~~~~~~
Error: node_modules/@apollo/client/core/QueryManager.d.ts:1:23 - error TS2688: Cannot find type definition file for 'zen-observable'.
1 /// <reference types="zen-observable" />
~~~~~~~~~~~~~~
Error: node_modules/@apollo/client/link/core/ApolloLink.d.ts:1:23 - error TS2688: Cannot find type definition file for 'zen-observable'.
1 /// <reference types="zen-observable" />
~~~~~~~~~~~~~~
Error: node_modules/@apollo/client/link/core/ApolloLink.d.ts:14:46 - error TS2503: Cannot find namespace 'ZenObservable'.
14 protected onError(error: any, observer?: ZenObservable.Observer<FetchResult>): false | void;
~~~~~~~~~~~~~
Error: node_modules/@apollo/client/link/core/types.d.ts:1:23 - error TS2688: Cannot find type definition file for 'zen-observable'.
1 /// <reference types="zen-observable" />
~~~~~~~~~~~~~~
Error: node_modules/@apollo/client/link/error/index.d.ts:1:23 - error TS2688: Cannot find type definition file for 'zen-observable'.
1 /// <reference types="zen-observable" />
~~~~~~~~~~~~~~
Error: node_modules/@apollo/client/link/retry/retryLink.d.ts:1:23 - error TS2688: Cannot find type definition file for 'zen-observable'.
1 /// <reference types="zen-observable" />
~~~~~~~~~~~~~~
Error: node_modules/@apollo/client/link/utils/fromError.d.ts:1:23 - error TS2688: Cannot find type definition file for 'zen-observable'.
1 /// <reference types="zen-observable" />
~~~~~~~~~~~~~~
Error: node_modules/@apollo/client/link/utils/fromPromise.d.ts:1:23 - error TS2688: Cannot find type definition file for 'zen-observable'.
1 /// <reference types="zen-observable" />
~~~~~~~~~~~~~~
Error: node_modules/@apollo/client/link/utils/toPromise.d.ts:1:23 - error TS2688: Cannot find type definition file for 'zen-observable'.
1 /// <reference types="zen-observable" />
~~~~~~~~~~~~~~
Error: node_modules/@apollo/client/link/ws/index.d.ts:1:23 - error TS2688: Cannot find type definition file for 'zen-observable'.
1 /// <reference types="zen-observable" />
~~~~~~~~~~~~~~
Error: node_modules/@apollo/client/utilities/observables/Concast.d.ts:1:23 - error TS2688: Cannot find type definition file for 'zen-observable'.
1 /// <reference types="zen-observable" />
~~~~~~~~~~~~~~
Error: node_modules/@apollo/client/utilities/observables/asyncMap.d.ts:1:23 - error TS2688: Cannot find type definition file for 'zen-observable'.
1 /// <reference types="zen-observable" />
~~~~~~~~~~~~~~
Error: node_modules/@apollo/client/utilities/observables/subclassing.d.ts:1:23 - error TS2688: Cannot find type definition file for 'zen-observable'.
1 /// <reference types="zen-observable" />
~~~~~~~~~~~~~~
How to reproduce the issue:
tsc
on project including @apollo/client@3.4.10
Versions
System:
OS: macOS 11.5
Binaries:
Node: 14.17.5 - ~/.nvm/versions/node/v14.17.5/bin/node
npm: 6.14.14 - ~/.nvm/versions/node/v14.17.5/bin/npm
Browsers:
Chrome: 92.0.4515.159
Firefox: 91.0
Safari: 14.1.2
npmPackages:
@apollo/client: 3.4.10 => 3.4.10
apollo-angular: 2.6.0 => 2.6.0
apollo-server-core: 3.3.0 => 3.3.0
apollo-server-express: 3.3.0 => 3.3.0
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Cannot find type definition file for 'zen-observable
I'm working with Ionic 3, I just choose aws default template and I get an error:
Read more >ObservableQuery - Apollo GraphQL Docs
The single Error object that is passed to onError and useQuery hooks, and is often thrown during manual client.query calls. This will contain...
Read more >Getting error for types that I have installed but dont use when I ...
Run npx tsc and look at the errors you get : node_modules/@jest/environment/build/index.d.ts:8:23 - error TS2688: Cannot find type definition ...
Read more >@types/zen-observable - npm
TypeScript definitions for zen-observable. Latest version: 0.8.3, last published: a year ago. Start using @types/zen-observable in your ...
Read more >Cannot find type definition file for 'zen-observable' - Ionic Forum
This Bug is a starting Bug that must be fixed at the nearest delay. > ionic start app0 aws // aws is a...
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
@benjamn: Are you saying I need to make
zen-observable-ts
a dependency of our project to eliminate this transpilation error? We’ve never included it as a dependency with prior versions of@apollo/client
.Right, no need to start depending on
zen-observable-ts
! A better recommendation would have been to deletenode_modules/zen-observable-ts
and then rerunnpm i
. Sorry for any confusion.