【发布时间】:2018-09-07 12:54:14
【问题描述】:
我使用公司代理并尝试从托管在同一代理上的 nexus 存储库访问 npm 包。我可以使用相同的用户名和密码从浏览器登录到 nexus 存储库,但不能通过 npm cli
这是我的 .npmrc 文件的样子
http-proxy=http://username:password@companyproxy.com:8080
https-proxy=http://username:password@companyproxy.com:8080/
email=email@companyproxy.com
always-auth=true
registry=http://customrepository.com
strict-ssl=false
no_proxy=.companyproxy.com
_auth="someauthtoken"
这是我得到的错误:
npm install -g @angular/cli
npm ERR! code E401
npm ERR! 404 401 Unauthorized: @angular/cli@latest
【问题讨论】:
-
如果您登录到 UI,您可以下拉 npm 组件,特别是您收到错误的组件吗?您的用户可能没有访问权限。
标签: npm nexus npm-install nexus3