-
Notifications
You must be signed in to change notification settings - Fork 758
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] Build fails with react-static 6.3.6 #1027
Comments
hey OP, i can replicate your issue with npm, however, when i removed sooo... might wanna use yarn for the time being. i know its not a satisfying answer. |
I installed with npm 6.8.0 and save the node_modules, and run the command: find . -name package.json | xargs grep ^\ \ \"version\" > ../6.3.6.npm.txt and find . -name package.json | xargs grep ^\ \ \"version\" > ../6.3.2.npm.txt And then
|
So the problem seems to be webpack depends on I added yarn hoist |
Hmm... I managed to get it working, as can be seen in the main branch, but I'm not sure how. I tried installing However, if I now delete
After this, the build fails again, but installing |
Note that applications properly defined in their Is there a package somewhere that doesn't list its |
hi! thanks for coming by! struggling to figure this out due to ignorance 😅 this is a helpful pointer, i can try to trace the acorn dependencies. surprised to hear that npm is not at fault, i had heard yarn had more subjectively “correct” hoisting as a key feature. |
https://github.com/react-tools/eslint-config-react-tools published by @tannerlinsley is relying on an out of date eslint which relies on an out of date espree. if we bump deps of |
Hoisting is hard and as you say it's very subjective what's a "correct" hoisting - should a good hoisting prioritize correctness (and only merge strictly identical versions), or size (and always merge when the ranges overlap)? When multiple different versions of the same package can be hoisted to the same level, which one prioritize? Etc. Lots of heuristics are possible, so in the end the only guarantee Yarn and npm can do is: don't rely on the hoisting to obtain your dependencies.
It seems like webpack 4.28.4 depended on |
I want to add some note regarding npm/yarn hoisting. I think this is still due to some bug in npm because if I add acorn@5 to the top package.json to force it to top level, yarn install still works. There's a peerDependencies bug in npm recently that cause webpack 4.29 to fail and I am not sure the fix has been released yet.
Another behavior I've observed is that npm sometimes doesn't create private Finally, debugging dependencies is something I have to deal with regularly. I wrote a blog related to the webpack 4.29 incident recently. https://medium.com/walmartlabs/debug-nodejs-dependencies-51eb40f484ec |
joel, you're a legend. glad you are helping us out with your knowledge. npm acknowledges the bug and has not fixed it yet. |
You are welcome. Glad I could help. |
I installed 6.3.5 and the build works as expected. |
@tannerlinsley it looks like @sw-yx has put up a PR on eslint-config-react-tools that might help work around this issue in the short term, at least for the basic template. Could you please take a look and see if it's ok to merge? Thanks! |
Yeah I'll get that merged and released asap |
Awesome, thanks, that's got it! |
My site was building fine with react-static
6.3.2
, but after updating to6.3.6
the build fails. You can see the repository here: https://github.com/Herohtar/thalion-herohtar/tree/6.3.6The update to react-static is the only thing different from the previous commit.
Environment
Error
The text was updated successfully, but these errors were encountered: