TypeError: tsInvariant.setVerbosity is not a function
See original GitHub issueJust updated from 3.2.5 to latest version to apollo and on local run I get this error:
TypeError: tsInvariant.setVerbosity is not a function
at Object../node_modules/@apollo/client/core/core.cjs
I tried to add tsInvariant as dev dependency, but still no luck. Anyway, why I need any ts lib if I use simple React?
"@apollo/client": "^3.5.4",
"react": "^16.8.4",
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Apollo - React (Typescript) Invariant Error when building ...
I added fetch to my code, and it built a production version with no errors. I don't understand why this error was not...
Read more >ts-invariant - npm
Start using ts-invariant in your project by running `npm i ts-invariant`. There are 194 other projects in the npm registry using ts-invariant.
Read more >Help for Lift-off part 1 Odyssey course - Apollo Community
"export 'setVerbosity' (reexported as 'setLogVerbosity') was not found in 'ts-invariant'. Kindly advice on this. Cheers, Anguram Shanmugam.
Read more >Developers - @apollo-client 3.3.2 fails to compile due to ...
@apollo-client 3.3.2 fails to compile due to wrong ts-invariant version resolved. apollostack. 02 December 2020 Posted by eugeneoshepkov. Intended outcome:
Read more >ts-invariant | Yarn - Package Manager
ts-invariant ... of these methods can be globally reconfigured using the setVerbosity function: ... apollographql/invariant-packages · ts-invariant ...
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
Fixed my issue per this StackOverflow post: https://stackoverflow.com/questions/70615613/apollo-client-named-export-remove-not-found
In my SvelteKit/Vite project I added this to the svelte.config for the vite config settings:
I also needed to properly import Apollo client functions via “@apollo/client/core/index.js”. Don’t think this will help OP, but might be useful for someone else.
I also experienced this issue because of
ts-invariant@0.4.4
fromapollo-server-express
.@apollo/client
hasts-invariant@0.10.3
.