NPM unknown protocol

后端 未结 1 424
无人及你
无人及你 2020-12-18 16:19

When I run npm install I get following error. It seems it can\'t download any package. I use node 8.2.1 and npm 5.3.0

Do you have any idea what is wrong

相关标签:
1条回答
  • 2020-12-18 16:54

    I also had this problem. The following trick has worked for me.

    It would be better if you upgrade your node and npm versions to latest. After that please follow the below steps.

    Try running curl https://registry.npmjs.org/package-name from your terminal to make sure that network call is not blocking the package requests to npm registry.

    If you are running behind a proxy, then you also have to configure npm to use it, and you can set it using:

    npm config set proxy http://proxyhost:proxyport

    npm config set http-proxy http://proxyhost:proxyport

    npm config set https-proxy http://proxyhost:proxyport

    npm config set registry http://registry.npmjs.org/

    Hope the above trick resolve your issue.

    0 讨论(0)
提交回复
热议问题