[BUG] NPM doesn't allow me to 'npm i' on even slightly weak network connections #4430
Open
Description
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
When I run npm i
on my computer (Macbook Pro 2020) with a 5G internet connection that drops packages every now and then, the command hangs at larger packages.
Basically:
- I run
npm i
- It downloads a few packages
- It reaches a package that is slightly big
- Then just... stops.
- I have to then
CTRL+C
in the terminal to quit the process and find a more consistent network connection.
Expected Behavior
I would expect my package manager to at least work when my connection wavers a little. The fact that NPM just fails completely is dissapointing.
Steps To Reproduce
- Connect to a slightly unstable network connection
- Start a project with some node_modules
- Run
npm i
- Observe that it hangs when it reaches a large package.
Environment
- npm: npm 8.3.0
- Node.js: Node.js v16.11.0
- OS Name: MacOS Monterey 12.2.1
- System Model Name: Macbook Pro 2020
- npm config:
; "builtin" config from /opt/homebrew/lib/node_modules/npm/npmrc
prefix = "/opt/homebrew"
; "project" config from /Users/okirp/Desktop/ojasvin/.npmrc
engine-strict = true
; node bin location = /opt/homebrew/Cellar/node/16.11.0/bin/node
; cwd = /Users/okirp/Desktop/ojasvin
; HOME = /Users/okirp
; Run `npm config ls -l` to show all defaults.