无法下载npm范围的工件

无法下载npm范围的工件,npm,artifactory,Npm,Artifactory,升级到5.1.3后,我们的npm回购协议不允许下载npm范围内的人工制品 npm install @angular/core npm ERR! Linux 3.10.0-514.2.2.el7.x86_64 npm ERR! argv "/usr/bin/node" "/bin/npm" "install" "@angular/core" npm ERR! node v6.9.1 npm ERR! npm v3.10.8 npm ERR! code E401 npm ERR! Registr

升级到5.1.3后,我们的npm回购协议不允许下载npm范围内的人工制品

npm install @angular/core
npm ERR! Linux 3.10.0-514.2.2.el7.x86_64
npm ERR! argv "/usr/bin/node" "/bin/npm" "install" "@angular/core"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code E401

npm ERR! Registry returned 401 for GET on https://artifactory.mycompany.com/artifactory/api/npm/npmrepo/@angular%2fcore
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /root/npm-debug.log
我甚至尝试在关闭apache的情况下下载。结果相同。因为一些我不知道的事情,tomcat正在解码斜杠

@angular%2fcore

我也有同样的问题。我通过在我的
.npmrc
中添加以下内容解决了此问题:

always-auth = false

但是我们的artifactory服务器是HTTP。

为了确保,您在“.npmrc”文件中定义了作用域包的使用,如artifactory NPM文档中所述:例如:@angular:registry=以及另一件要检查的事情,当您得到401时,检查运行该命令的用户的权限。401,表示用户没有足够的权限。您还应该在request.log-in-Artifactory中查看该请求在Artifactory中列出的用户。您好,.npmrc文件@angular:registry=我想我得到401是因为URL中有%2f。角%2fcore没有回购或工件。PS出于测试目的,我创建了一个对每个npm repo都具有完全权限的帐户,现在我正在使用它。您好,在使用npm安装“”时,作用域添加在存储库密钥之后。我注意到但不确定的一点是,您应该以“/”结尾注册表url。例如,下面是我使用npm存储库scope的示例,名为“npm”@angular:registry=如果您可以使用“npm I@angular/core--verbose”使用verbose标志添加安装请求的结果,可能会有更多帮助。
always-auth = false