Facing migration issue with apollo-client@2.6.8 to @apollo/client@3.2.7
See original GitHub issueIntended outcome:
it could be run as of migration guide said.
Actual outcome:
I don’t get is that have peer dependancy with apollo-client
. I followed migration steps from official documentation
ERROR in /node_modules/@apollo/react-common/lib/context/ApolloConsumer.d.ts(2,26):
TS2307: Cannot find module 'apollo-client'.
ERROR in /node_modules/@apollo/react-common/lib/context/ApolloContext.d.ts(2,26):
TS2307: Cannot find module 'apollo-client'.
ERROR in /node_modules/@apollo/react-common/lib/context/ApolloProvider.d.ts(2,26):
TS2307: Cannot find module 'apollo-client'.
ERROR in /node_modules/@apollo/react-common/lib/types/types.d.ts(1,221):
TS2307: Cannot find module 'apollo-client'.
ERROR in /node_modules/@apollo/react-hoc/lib/types.d.ts(1,147):
TS2307: Cannot find module 'apollo-client'.
ERROR in /node_modules/@apollo/react-hooks/lib/data/OperationData.d.ts(1,30):
TS2307: Cannot find module 'apollo-client'.
ERROR in /node_modules/@apollo/react-hooks/lib/data/QueryData.d.ts(1,35):
TS2307: Cannot find module 'apollo-client'.
ERROR in /node_modules/@apollo/react-hooks/lib/ssr/RenderPromises.d.ts(2,33):
TS2307: Cannot find module 'apollo-client'.
ERROR in /node_modules/@apollo/react-hooks/lib/types.d.ts(3,60):
TS2307: Cannot find module 'apollo-client'.
ERROR in /node_modules/@apollo/react-hooks/lib/useApolloClient.d.ts(1,26):
TS2307: Cannot find module 'apollo-client'.
ERROR in /node_modules/@apollo/react-hooks/lib/useSubscription.d.ts(8,20):
TS2307: Cannot find module 'apollo-client'.
ERROR in /node_modules/@apollo/client/core/ObservableQuery.d.ts(22,9):
TS1086: An accessor cannot be declared in an ambient context.
How to reproduce the issue:
while I migrated from apollo-client@2.6.8 to @apollo/client@3.2.7
Versions
System: OS: macOS 10.15.6 Binaries: Node: 12.7.0 - ~/.nvm/versions/node/v12.7.0/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.14.8 - ~/.nvm/versions/node/v12.7.0/bin/npm Browsers: Chrome: 86.0.4240.198 Safari: 14.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Migrating to Apollo Client 3.0 - Apollo GraphQL Docs
This article walks you through migrating your application to Apollo Client 3.0 from previous versions of Apollo Client. To illustrate the migration process, ......
Read more >Pitfalls I fell into during Apollo Client 3.0 migration
Recently I worked on migrating Apollo Client to 3.0 from 2.6 in our project. ... This issue happens because Apollo checks options update...
Read more >Migration Guide – Angular - GraphQL Code Generator
Updating your app to Angular Apollo v3.
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
For
getDataFromTree
, you can doAs for the
jscodeshift
error, you need to temporarily clone this repository into the directory where you’re running thenpx jscodeshift
command, or clone it somewhere else and adjust the path to refer to that directory. TheREADME.md
for the codemod covers this step (“Note that theapollo-client
directory…”).Let us know if this is still a concern with
@apollo/client@latest
- thanks!