Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
674 views
in Technique[技术] by (71.8m points)

Node 用 Npm安装东西(vue 淘宝镜像等)都出错?如下图,请问怎么解决?

安装 vue-cli 或者其他任何东西 都出现以下错误。

$ npm install -g cnpm --registry=http://registry.npm.taobao.org
npm ERR! fetch failed http://registry.npm.taobao.org/cnpm/download/cnpm-4.5.0.tgz
npm WARN retry will retry, error on last attempt: Error: unable to verify the first certificate
npm ERR! fetch failed http://registry.npm.taobao.org/cnpm/download/cnpm-4.5.0.tgz
npm WARN retry will retry, error on last attempt: Error: unable to verify the first certificate
 $ cnpm -v
npm ERR! fetch failed http://registry.npm.taobao.org/cnpm/download/cnpm-4.5.0.tgz
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "cnpm" "--registry=http://registry.npm.taobao.org"
npm ERR! node v6.10.0
npm ERR! npm  v3.10.10
npm ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATURE

npm ERR! unable to verify the first certificate
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:Usersestsu
pm-debug.log

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

我也遇到这个问题了,我是在安装node的时候自定义目录了,不是默认的,所以安装这个淘宝镜像出错


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
...