-
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
Import @apollo/client/core unnecessarily require react #8809
Comments
Same here. |
I get the same problem. |
I have this same issue too. Didn't have a problem 2 days ago before the new release. |
Same from my side, I do confirm the regression's been introduced in the latest release. |
Got the same issue; no issue in v3.4.11 but error in v3.4.12 ..... Waiting for React to be removed with v4 #7318 |
May fix #8809, since this line could explain the appearance of `require('..')` in `@apollo/[email protected]`, as noticed by @ianhe8x. Both styles of import _should_ work, but we can be more explicit/precise when the import does not cross entry points.
Sorry for the auto-close. We'll close this after confirming the next |
Successfully tested for me. Thanks for the reactivity! |
Thanks for the update @korbav! @ianhe8x and others, please give |
@benjamn |
Closing based on multiple confirmations, but of course we're happy to reopen if @ianhe8x is still having problems. Thanks everyone! |
Intended outcome:
Doesn't need to have react installed when only
@apollo/client/core
is used. It was fine at v3.4.9.Actual outcome:
panic because I don't have react.
How to reproduce the issue:
use latest version 3.4.12 and use ApolloClient without react in package.json
Versions
System:
OS: macOS 11.5.2
Binaries:
Node: 14.15.2 - ~/.nvm/versions/node/v14.15.2/bin/node
Yarn: 1.22.5 - ~/.yarn/bin/yarn
npm: 7.6.3 - /usr/local/bin/npm
Browsers:
Chrome: 93.0.4577.63
Edge: 93.0.961.44
Firefox: 91.1.0
Safari: 14.1.2
** clues **
in
@apollo/client/utilities/utilities.cjs.js
, in v3.4.12 there'svar __ = require('..');
which not exists in v3.4.9** error stack **
The text was updated successfully, but these errors were encountered: