npm install gets stuck at fetchMetadata

前端 未结 12 1071
星月不相逢
星月不相逢 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:14

    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://git@github.com/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!

提交回复
热议问题