安装cnpm的坑

问题:

在终端输入:
npm i -g cnpm --registry=https://registry.npm.taobao.org

终端反馈:
`npm ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! errno UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! request to https://registry.npm.taobao.org/cnpm failed, reason: unable to verify the first certificate

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2020-08-29T10_12_51_489Z-debug.log`

解决方案:

在终端输入:
npm config set strict-ssl false

再执行安装操作:
npm i -g cnpm --registry=https://registry.npm.taobao.org

稍等片刻。。。

在终端输入检测指令:
cnpm -v

终端反馈版本号,成功。。。

posted @ 2020-08-29 18:24  wing1377  阅读(449)  评论(0编辑  收藏  举报