I\'m currently unable to run npm install
in any project since today.
I\'m running node v8.2.1 & npm 5.3.0 (installed via nvm).
When typing npm
Probably not the best solution, but my workaround was to push up my active branches to origin, re-clone my repo into a different folder, then npm install in the new folder.
You can try by setting the configuration to:
npm config set registry
It works for me
I have experienced this and fixed it with rm -rf ~/.npm
or npm cache clean
.
If that doesn't work, perhaps install with Homebrew instead of nvm, to eliminate some possibilities.
Adding to @CptUnlucky's answer.
npm config set registry "http://registry.npmjs.org"
This forces the http fetch. If this alone doesn't work, throttle the number of simultaneous connections that can be established. Default Max connections is 50.
npm set maxsockets 3
That worked for me.
I solve this issue by opening the package-lock.json and reset all the json. Delete the current content and replace it with
{}
then reinstall the package.
This is how I resolved this after spending half an hour:
npm config set registry http://registry.npmjs.org/ --global
npm cache clear --force
{}
onlynpm install --verbose
node: v12.14.1 npm: v6.13.4
This issue occure when I tried running ng update
on angular 6 app to update it to angular 9.