NPM unknown protocol

一笑奈何 提交于 2019-11-29 08:51:49

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!