-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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] npm stuck during workspace installation #3933
Comments
Thanks for the report @Eomm! I've confirmed this is an infinite loop caused only when installing inside a workspace. This also looks similar to #3385 which was fixed in Arborist, and I confirmed that case is no longer reproducible. I was able to run
|
It's also worth mentioning that the same command, run on another OS (Windows, I can provide more details if needed), does not exhibit the same behavior, meaning that it does not hang indefinitely. I can't say whether it's the OS making the real difference or other circumstance, though. |
@simoneb That's interesting. I have this issue reproduced with a failing test case (npm/arborist#343) that I'm working to fix this week. Our CI will run it across all OS we support so that should show us if we have any different platform behavior. If you have a repo with a package-lock that hangs on Windows that would be very helpful. |
I do not have such a repo because the command that @Eomm mentioned in the issue when run on my Windows machine does not hang, although it does show some slowdown, but eventually comes to a successful end. |
I'm sorry, I misread your previous comment. 🤦 I will poke around at the eventual fix and see if I can find any differences between platforms. Thanks for the info! |
Could some |
Yes, the most likely being |
Fix: npm/cli#3933 Previously, installing a tree that causes peerSets to be pruned would cause an infinite loop when done inside a workspace. This patch stops that check if the entryEdge is a workspace, the same as being done if it were the project root. This patch also adds some incorrect tests that were discovered when debugging this, and will be fixed in the future (#347 #348).
@simoneb @Eomm This should be fixed in |
Yes, it is fixed: https://github.com/Eomm/npm-stuck/runs/4130014056?check_suite_focus=true Will this fix be backported to v7 as well? Thank you |
Is there an existing issue for this?
Current Behavior
Running the installation of modules that has a mismatch
peerDependancy
lead to an infinite installation within the process stuck at 100% CPUThe origin of this issue comes from solving the installation issue on this project, where I used
--legacy-peer-deps
to complete the installation:https://github.com/nearform/titus/runs/3967425473?check_suite_focus=true
The
titus-frontend
loads:/titus/node_modules/babel-loader
instead of:
/titus/node_modules/react-scripts/node_modules/babel-loader
Maybe it is related to:
#3208
Expected Behavior
The installation should complete
Steps To Reproduce
Environment
Github action (all OSs and npm 8.1.0 and 7.24.2)
https://github.com/Eomm/npm-stuck/actions/runs/1371673160
Note the windows jobs are green, but it shows the
out of memory
stacktrace.The text was updated successfully, but these errors were encountered: