You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like the metro bundler needs additional configuration in order to implicitly resolve files with the .cjs extension (see facebook/metro#535 (comment)).
You can change your import statement to import { ApolloClient, InMemoryCache } from '@apollo/client/main.cjs';, or you can configure config.resolver.sourceExts in metro.config.js so that import { ApolloClient, InMemoryCache } from '@apollo/client'; can be resolved.
After npm installing @expo/metro-config, I was able to get the grounded-ramen app running with the following config:
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
For general questions, we recommend using StackOverflow or our discord server.
Issue Description
Hello,
I am unable to use Apollo Client in Expo application. Whatever I am trying it says some functions or classes are undefined.
Link to Reproduction
https://snack.expo.dev/@zdnk/grounded-ramen
Reproduction Steps
install @apollo/client in Expo app
try to instantiate ApolloClient with InMemoryCache
The text was updated successfully, but these errors were encountered: