-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug in removeTemporaryGlobals in react-native #8754
Comments
@doomsower What do you see if you run
Possibly related: #8663 (comment) |
@benjamn Same output both in monorepo root and in mobile app package dir:
Maybe this can be helpful. npm ls graphql
npm ls @apollo/client
|
@benjamn I have the same error. I am not as familiar with Apollo Code to know how to fix it but I think maybe my debugging will help a bit ;) |
@wokayme See #8862 for a similar fix (coming in the next 3.4.x release)! @doomsower Does React Native have a setting like webpack's |
@doomsower @wokayme This should be fixed in |
I'm upgrading my monorepo app (web, react-native) from apollo-client v2 to apollo-client v3. So far, upgrade went smooth for web apps and shared libraries. In react-native-app, however, I'm getting error you can see below in Actual outcome section.
I've checked source code of apollo-client here and it seems that this
removeTemporaryGlobals
is a workaround for graphql/graphql-js#2894. So I've commented out everything related toremoveTemporaryGlobals
and it seems to be working now. Maybe because I've locked my graphql version to15.5.2
in yarn resolutions and graphql/graphql-js#3186 seems to be fixing the same bug ingraphql@15.5.2
.Intended outcome:
App should at least build and start
Actual outcome:
I'm getting
undefined is not a function
error inglobals.cjs.js (41:5)
How to reproduce the issue:
Versions
I guess
npx envinfo@latest --preset apollo --clipboard
is not returning everything it's supposed to return because of monore.@apollo/client
3.4.10
graphql
15.5.2
System:
OS: macOS 11.5.1
Binaries:
Node: 14.17.4 - ~/.nvm/versions/node/v14.17.4/bin/node
Yarn: 1.22.11 - ~/.nvm/versions/node/v14.17.4/bin/yarn
npm: 7.20.3 - ~/.nvm/versions/node/v14.17.4/bin/npm
Browsers:
Chrome: 92.0.4515.159
Firefox: 91.0.2
Safari: 14.1.2
The text was updated successfully, but these errors were encountered: