我在Windows10上使用ubuntu来安装和运行npm。我使用以下命令下载了nodejs:
curl -sL https://deb.nodesource.com/setup_10.x | bash
apt-get install -yq nodejs 我使用以下命令设置代理参数:
npm config set proxy http://my.domain.name:port
npm config set https-proxy http://my.domain.name:port在执行npm install时,我得到以下错误:
...
npm ERR! code E403
npm ERR! 403 Forbidden - GET https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz
npm ERR! A complete log of this run can be found in:
...我看过类似的帖子,但都没有成功:Using npm behind corporate proxy .pac npm behind a proxy fails with status 403
如果你对这件事有什么想法,请告诉我,最好
发布于 2019-10-11 15:10:51
尝尝这个
export https_proxy=http://my.domain.name:port
export http_proxy=http://my.domain.name:port发布于 2019-10-14 14:48:57
终于解决了我的问题。管理员定义的代理设置不允许连接到https://registry.npmjs.org/。我不得不在我的windows10代理设置中为那个特定的地址定义一个例外。谢谢你的帮忙
https://stackoverflow.com/questions/58335836
复制相似问题