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 install it gets stuck on fetchMetadata everytime: ⸨ ░░░░░░░░░░░░░░░░⸩ ⠧ fetchMetadata: sill pacote range manifest for longest@^1.0.1 fetched in 197ms
I've tried switching back to npm 5.0.3 which worked flawless, but still get stuck.
Details to my computer: MacBook Pro running macOS 10.12.6
Remove node_modules and package-lock. To solve the issue, try removing the entire node_modules/ folder and the package-lock. json file. Then try running the npm install command again. That may fix the issue.
On Windows, the cause of this error could be that a PATH or system variable is not correctly set. The error can also occur if you do not have npm or Node. js installed, have an outdated version, or have permission issues.
The -f or --force argument will force npm to fetch remote resources even if a local copy exists on disk. The -g or --global argument will cause npm to install the package globally rather than locally.
This is how I resolved this after spending half an hour:
npm config set registry http://registry.npmjs.org/ --globalnpm cache clear --force{} onlynpm install --verbosenode: 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.
As a first thing, run npm install --verbose to see more!
What happened in my case:
In your package.json search for packages you directly get from Github. In my case such a package did not exist anymore. Such lines look like
"NAME_OF_PACKAGE": "git+ssh://[email protected]/SOME_USER/NAME_OF_PACKAGE.git", Remove the package, fix the name/location or change to the npm version of the package.
Further note: I got several other similar errors, all the same but the package name was different from longest@^1.0.1. I also had p-try@something or array-ify@something
For me all that didn't work: rm -rf ~/.npm, npm cache clean or rm package-lock.json all didn't work!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With