Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

node.js - npm install gets stuck at fetchMetadata

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This is how I resolved this after spending half an hour:

  1. npm config set registry http://registry.npmjs.org/ --global
  2. npm cache clear --force
  3. setting package-lock.json to {} only
  4. npm 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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...