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.

Property 'observable' must be of type 'symbol', but here has type 'unique symbol'.

See original GitHub issue

Intended 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:

  1. Create a new Angular project
  2. Install Apollo client with ng add apollo-angular
  3. 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:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
benjamncommented, Nov 17, 2020

This should now be fixed in @apollo/client@3.2.7, thanks to #7340, as verified by successfully running ng add angular-apollo in a new Angular application, following @matt-goldman’s reproduction steps.

2reactions
fetiscommented, Nov 17, 2020

@benjamn yes, it’s fixed now. thank you-thank you-thank you

Read more comments on GitHub >

github_iconTop 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 >

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