Property 'observable' must be of type 'symbol', but here has type 'unique symbol'.
See original GitHub issueIntended outcome:
Install the apollo angular client
Actual outcome:
Client installs, but project will not compile. With a brand new Angular 11 project, with nothing done to it except ng add apollo-angular
, I get the following error
ERROR in node_modules/@apollo/client/node_modules/symbol-observable/index.d.ts:6:14 - error TS2717: Subsequent property declarations must have the same type. Property 'observable' must be of type 'symbol', but here has type 'unique symbol'.
6 readonly observable: unique symbol;
~~~~~~~~~~
node_modules/@types/node/globals.d.ts:146:14
146 readonly observable: symbol;
~~~~~~~~~~
'observable' was also declared here.
How to reproduce the issue:
- Create a new Angular project
- Install Apollo client with
ng add apollo-angular
- Try to build or run the project
Versions
System: OS: Windows 10 10.0.18363 Binaries: Node: 12.16.3 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.5 - ~\AppData\Roaming\npm\yarn.CMD npm: 6.14.4 - C:\Program Files\nodejs\npm.CMD Browsers: Chrome: 86.0.4240.198 Edge: Spartan (44.18362.449.0) npmPackages: @apollo/client: ^3.0.0 => 3.2.6 apollo-angular: ^2.1.0 => 2.1.0
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Apollo Error - Property 'observable' must be of type 'symbol ...
Apollo Error - Property 'observable' must be of type 'symbol', but here has type 'unique symbol'. I'm trying to set up a new...
Read more >TypeScript observable object with Symbol.observable ponyfill
I've tried using typeof $$observable for the key and tried making Symbol.observable a unique symbol , but neither of those worked. I've had...
Read more >Google TypeScript Style Guide
Visibility. Restricting visibility of properties, methods, and entire types helps with keeping code decoupled. Limit symbol visibility as much as possible.
Read more >15 Typescript Mistakes To Avoid - SoftwareMill Tech Blog
Here is a list of common Typescript bad practices that you should make ... In the Typescript world we can have implicit and...
Read more >RxJS: How to Use Interop Observables - ncjamieson
Rx.NET introduced the Observable type — a combination of the observer and ... RxJS used to polyfill Symbol.observable , but its doing so...
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
This should now be fixed in
@apollo/client@3.2.7
, thanks to #7340, as verified by successfully runningng add angular-apollo
in a new Angular application, following @matt-goldman’s reproduction steps.@benjamn yes, it’s fixed now. thank you-thank you-thank you