[BUG] `npm update` hangs for some dependencies for `npm>=10.4.0`
charlesbjohnson opened this issue · comments
Charlie Johnson commented
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
After updating NPM from 10.2.4
to 10.5.2
, I noticed that npm update
was hanging when updating a specific dependency in one of my projects. I was able to reproduce the issue in a reduced environment here:
Please see the README there for more details.
I've confirmed the issue is present on:
- Linux
- macOS
- Windows
And that the issue appears between npm@10.3.0
and npm@10.4.0
.
Expected Behavior
npm update
should not hang.
Steps To Reproduce
Please see the steps to reproduce in this repository:
TL;DR:
- With
npm
>=10.4.0
... - Clone the repository...
- Run
npm install
- Run
npm update follow-redirects
- Observe that
npm update
hangs
Environment
- npm: 10.7.0
- Node.js: 22.1.0
- OS Name: Amazon Linux 2023 (also macOS 14.4.1 and Windows 10)
- System Model Name: N/A
- npm config:
; node bin location = /home/ec2-user/.asdf/installs/nodejs/22.1.0/bin/node
; node version = v22.1.0
; npm local prefix = /home/ec2-user/npm-cli-v10-bug
; npm version = 10.7.0
; cwd = /home/ec2-user/npm-cli-v10-bug
; HOME = /home/ec2-user