[3.0.0-beta.24] Module not found: Can't resolve 'apollo-client' in 'node_modules/@apollo/react-hooks/lib'
See original GitHub issueUpgraded to 3.0.0-beta, everything worked until I did a hard restart of my create-react-app. Upon running my app, I receive the following error:
./node_modules/@apollo/react-hooks/lib/react-hooks.esm.js
Module not found: Can't resolve 'apollo-client' in '/Users/bstrom/dev/reviewtool/node_modules/@apollo/react-hooks/lib'
Versions System: OS: macOS Mojave 10.14.6 Binaries: Node: 12.13.0 - ~/.nvm/versions/node/v12.13.0/bin/node Yarn: 1.21.1 - /usr/local/bin/yarn npm: 6.12.0 - ~/.nvm/versions/node/v12.13.0/bin/npm Browsers: Chrome: 79.0.3945.117 Firefox: 72.0.1 Safari: 13.0.4 npmPackages: @apollo/client: ^3.0.0-beta.24 => 3.0.0-beta.24 @apollo/react-hooks: ^3.1.3 => 3.1.3 @apollo/react-testing: ^3.1.3 => 3.1.3 apollo-cache-inmemory: ^1.6.5 => 1.6.5 apollo-link: ^1.2.13 => 1.2.13 apollo-link-error: ^1.1.12 => 1.1.12 apollo-link-http: ^1.5.16 => 1.5.16 apollo-server: ^2.9.7 => 2.9.15 –>
Issue Analytics
- State:
- Created 4 years ago
- Comments:17 (3 by maintainers)
Top Results From Across the Web
Module not found: Can't resolve 'apollo-client' - Stack Overflow
Tried deleting old node_modules directory and then ran npm i command but the same error was shown on the console.
Read more >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 >Cannot get GraphQLWsLink to work (subscriptions) -- "Can't ...
Here is the full code, basically all I need is to create a ApolloClient and export it for use in my React code....
Read more >Get started with Apollo Client - Apollo GraphQL Docs
This short tutorial gets you up and running with Apollo Client. ... Applications that use Apollo Client require two top-level dependencies:.
Read more >Configuring the Apollo Client cache - Apollo GraphQL Docs
Note that these keyFields strings always refer to the canonical field names defined in the schema. This means that ID computation is not...
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
@bstro we haven’t quite finished our migration guide yet (it should be done this upcoming week), but React Apollo’s hooks are now included in
@apollo/client
. You can (and should) drop your@apollo/react-hooks
dependency, and instead import directly from@apollo/client
.Thank you @mhuconcern ! Based on what you said, I looked into it further and realized there was a beta version of react-ssr ( “@apollo/react-ssr”: “^4.0.0-beta.1”), and that fixed it upon updating. Seems like the old ssr had the hooks dependency, and that was my problem!