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
You didn’t install it according to the instructions on the official website. registry. It should be npm install -g cnpm --registry=https://registry.npm.taobao.org
The reason for the error is this:
unable to verify the first certificate
Literally means it is related to the certificate
Help you Baidu:
Portal
Downloading cnpm on Windows is inherently difficult. It is recommended to use nrm instead of registry to use the cnpm source.
It is recommended to use nrm, it is simple and painless