簡體   English   中英

我無法安裝“ angular / cli”軟件包。 npm返回錯誤:主機名\\ IP與證書替代名稱不匹配

[英]i cannot install 'angular/cli' package. the npm returns an error:Hostname\IP doesnt match certificate altnames

**這里是代碼**我在機構無線網絡中****

C:\Windows\system32>npm install -g angular-cli
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "angular-cli"
npm ERR! node v6.11.1
npm ERR! npm  v3.10.10

npm ERR! Hostname/IP doesn't match certificate's altnames: "Host: registry.npmjs
.org. is not in the cert's altnames: DNS:*.uonbi.ac.ke"
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!     C:\Windows\system32\npm-debug.log

我發現這實際上是網絡連接錯誤。 當您使用公司Web代理時,這是一個問題。 打開命令提示符或終端會話,然后運行以下命令以將npm配置為與Web代理一起使用。 這些命令使用proxy.company.com作為地址,並使用8080作為端口。

npm config設置代理http://proxy.company.com:8080 npm config設置https-proxy http://proxy.company.com:8080

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM