npm install 报错 :npm ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATURE npm ERR! errno UNABLE_TO_VERIFY_LEA 解决
无法验证第一证书,因为npm install走的是https协议,需要通过数字证书来保证的,所以,取消ssl验证。
·
错误:
npm ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! errno UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! request to https://registry.npmjs.org/express failed,
reason: unable to verify the first certificate
原因:
无法验证第一证书,因为npm install走的是https协议,需要通过数字证书来保证的,
所以,取消ssl验证
解决方案:
关掉strict-ssl即可, 如下:
npm config set strict-ssl false
用完之后恢复(我是懒得回复了):
npm config set strict-ssl true
更多推荐




所有评论(0)