【问题描述】
在执行npm install时报reason: self signed certificate in certificate chain,具体报错如下:
# npm install
npm ERR! code SELF_SIGNED_CERT_IN_CHAIN
npm ERR! errno SELF_SIGNED_CERT_IN_CHAIN
npm ERR! request to https://registry.npmjs.org/lodash failed, reason: self signed certificate in certificate chain
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2023-02-02T07_16_54_625Z-debug.log
[root@localhost xlsx2json-master]#
[root@localhost xlsx2json-master]#
[root@localhost xlsx2json-master]# npm install
npm ERR! code SELF_SIGNED_CERT_IN_CHAIN
npm ERR! errno SELF_SIGNED_CERT_IN_CHAIN
npm ERR! request to https://registry.npmjs.org/glob failed, reason: self signed certificate in certificate chain

【解决方法】
先执行npm set strict-ssl false取消npm的https认证,然后再执行npm install即可
注:npm install默认走的是https协议。
【问题描述】
在执行npm install时报reason: self signed certificate in certificate chain,具体报错如下:
# npm install
npm ERR! code SELF_SIGNED_CERT_IN_CHAIN
npm ERR! errno SELF_SIGNED_CERT_IN_CHAIN
npm ERR! request to https://registry.npmjs.org/lodash failed, reason: self signed certificate in certificate chain
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2023-02-02T07_16_54_625Z-debug.log
[root@localhost xlsx2json-master]#
[root@localhost xlsx2json-master]#
[root@localhost xlsx2json-master]# npm install
npm ERR! code SELF_SIGNED_CERT_IN_CHAIN
npm ERR! errno SELF_SIGNED_CERT_IN_CHAIN
npm ERR! request to https://registry.npmjs.org/glob failed, reason: self signed certificate in certificate chain
【解决方法】
先执行npm set strict-ssl false取消npm的https认证,然后再执行npm install即可
注:npm install默认走的是https协议。