0

C:UsersAdministrator>npm install -g cnpm --registry=https://regi
o.org --verbose
npm info it worked if it ends with ok
npm verb cli [ 'C:\Program Files\nodejs\node.exe',
npm verb cli 'C:\Program Files\nodejs\node_modules\npm\bin\
npm verb cli 'install',
npm verb cli '-g',
npm verb cli 'cnpm',
npm verb cli '--registry=https://registry.npm.taobao.org',
npm verb cli '--verbose' ]
npm info using npm@3.10.10
npm info using node@v6.10.0
npm verb request uri https://registry.npm.taobao.o...
npm verb request no auth needed
npm info attempt registry request try #1 at 17:27:29
npm verb request id 76ca2edeba60bead
npm http request GET https://registry.npm.taobao.o...
npm info retry will retry, error on last attempt: Error: unable to
rst certificate
npm info attempt registry request try #2 at 17:27:39
npm http request GET https://registry.npm.taobao.o...
npm info retry will retry, error on last attempt: Error: unable to
rst certificate
npm info attempt registry request try #3 at 17:28:39
npm http request GET https://registry.npm.taobao.o...
npm verb stack Error: unable to verify the first certificate
npm verb stack at Error (native)
npm verb stack at TLSSocket.<anonymous> (_tls_wrap.js:1085:38)
npm verb stack at emitNone (events.js:86:13)
npm verb stack at TLSSocket.emit (events.js:185:7)
npm verb stack at TLSSocket._finishInit (_tls_wrap.js:603:8)
npm verb stack at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:43
npm verb cwd C:UsersAdministrator
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program F
node_modules\npm\bin\npm-cli.js" "install" "-g" "cnpm" "--regis
gistry.npm.taobao.org" "--verbose"
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/is...
npm verb exit [ 1, true ]

npm ERR! Please include the following file with any support reques
npm ERR! C:UsersAdministratornpm-debug.log

2017-03-11 提问
4 个回答
0

已采纳

你没按照官网给的去安啊。 registry 。 应该是npm install -g cnpm --registry=https://registry.npm.taobao.org

0

错误原因是这个:
unable to verify the first certificate
字面意思是跟证书有关系的
帮你百度了下:
传送门

0

Windows 下装 cnpm 本来就比较惨,推荐使用 nrm 换 registry 方式使用 cnpm 源。

0

推荐使用nrm,简单无痛

$ npm i nrm -g
$ nrm ls
$ nrm use <你中意的源>

撰写答案

推广链接