错误SSL问题npm WIndows

问题描述 投票:2回答:1

您好,我在使用npm时遇到SSL问题。我运行这个命令:npm install ionic

我得到以下错误:

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "ionic"
npm ERR! node v4.1.2
npm ERR! npm  v2.14.4

npm ERR! Hostname/IP doesn't match certificate's altnames: "Host: registry.npmjs.org. is not in the cert's altnames: DNS:a.sni.fastly.net, DNS:a.sni.global-ssl.fastly.net"
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:\xampp\htdocs\receipt_finder\npm-debug.log

我已经使用此命令添加了我的公司证书

npm config -g set cafile C:\opt\Cyberoam_Single_CA.pem

怎么处理?

谢谢。

node.js windows ionic
1个回答
2
投票

请发出以下命令以放松使用不同证书cn的问题:

npm config set strict-ssl false

就这样。

© www.soinside.com 2019 - 2024. All rights reserved.