-
Notifications
You must be signed in to change notification settings - Fork 44
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
fix(graphql): resolve core-js version collision #819
Conversation
An alternative fix that works for me, is to install |
I still can't reproduce the error on my machine. 😕 |
So @toomuchdesign and I did some more research on the topic. That's what we found: This issue is related to the way Yarn hoists one of the two required Yarn then decides to hoist If This problem does not occur when Have a nice weekend everybody! |
My latest explanation consists of The polyfilled files are then supposed to resolve their But if:
... the polyfilled files will resolve to the wrong This issue precisely describes our case. |
Wow, this is interestingly bad... Does all this not imply we could add If I understand correctly, this would resolve the issue at hand - but it would be a 'breaking fix', would it not? |
We had a similar issue happening already with some styled component related package. In this scenario the added corejs polyfills where in the wrong version, which caused some polyfills to not exist. The fix was to install corejs in the project itself. I think it's fair to add corejs as peer dependency, but maybe in the main hops package as having the correct corejs version has so many implication. |
The most solid solution I can currently think of also consists of keeping a Since |
Discussion moved to |
This PR fixes a current issue where it's not possible to start the local dev server due to errors.
Steps to reproduce
yarn create hops-app --template hops-template-graphql my-new-hops-project
jest
andjest-preset-hops
dependencies:yarn remove jest jest-preset-hops
yarn start
The problem is a (partial) dependency tree like this with the latest version of
apollo-server-express
(2.4.8
):$ yarn list --pattern core-js ├─ apollo-env@0.3.4 │ └─ core-js@3.0.0-beta.13 └─ core-js@2.6.5
The respective
yarn why
-output forcore-js
is:$ yarn why core-js
With the version range for
apollo-server-express
introduced by this PR, the (partial) dependency tree looks like this:$ yarn list --pattern core-js ├─ @babel/polyfill@7.2.5 │ └─ core-js@2.6.5 └─ core-js@3.0.0-beta.13
And the respective
yarn why
-output forcore-js
is:$ yarn why core-js
The two different versions of
core-js
basically swap places in the tree, which fixes the issue with the local dev server… 🙃🤪😭