npm install gets stuck at fetchMetadata

前端 未结 12 1075
星月不相逢
星月不相逢 2020-12-25 13:40

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

12条回答
  •  时光取名叫无心
    2020-12-25 14:05

    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.

提交回复
热议问题