简体   繁体   English

与企业注册表的角度2 npm软件包安装错误

[英]angular 2 npm package install error with enterprise registry

We have an enterprise registry for NPM packages which replicates the standard registry " http://registry.npmjs.org/ ". 我们有一个NPM软件包的企业注册表,该注册表复制了标准注册表“ http://registry.npmjs.org/ ”。 I am trying to download following packages (present in package.json) 我正在尝试下载以下软件包(存在于package.json中)

"@angular/common": "2.0.0-rc.4",
"@angular/compiler": "2.0.0-rc.4",
"@angular/core": "2.0.0-rc.4",
"@angular/forms": "0.2.0",
"@angular/http": "2.0.0-rc.4",
"@angular/platform-browser": "2.0.0-rc.4",
"@angular/platform-browser-dynamic": "2.0.0-rc.4",
"@angular/router": "3.0.0-beta.1",
"@angular/router-deprecated": "2.0.0-rc.2",
"@angular/upgrade": "2.0.0-rc.4"

It is unable to find these packages in enterprise library and couldn't get it from standard registry presumably because of "@" sign. 它可能无法在企业库中找到这些软件包,并且可能是由于“ @”符号而无法从标准注册表中获取它。 I couldn't go to the standard registry directly as it is blocked. 我无法直接进入标准注册表,因为它被阻止了。 I have noted that when I browse to https://www.npmjs.com/package/@angular/core it says "ERROR: No README data found! " I can download other packages using enterprise registry. 我已经注意到,当我浏览到https://www.npmjs.com/package/@angular/core时,它会显示“错误:找不到自述文件!”,我可以使用企业注册表下载其他软件包。

I can successfully got these packages on my personal machine at home. 我可以在家里的个人计算机上成功获得这些软件包。 Any help is appreciated. 任何帮助表示赞赏。

You are behind corporate proxy currently.I will recommend using proxy in your node settings. 您目前落后于公司代理。建议您在节点设置中使用代理。

In terminal, you run: 在终端中,运行:

npm config edit

then set your proxy like this: 然后像这样设置您的代理:

proxy=http://your proxy url/
https_proxy=https://your proxy url/

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM