npm / npm

This repository is moving to: https://github.com/npm/cli
http://npm.community
17.54k stars 3.02k forks source link

npm is not installing " npm install -g cordova" #16192

Closed Karanki closed 7 years ago

Karanki commented 7 years ago

I'm opening this issue because:

What's going wrong?

i get erros that wont let me install cordova or phonegap.

How can the CLI team reproduce the problem?

npm install -g cordova npm ERR! Windows_NT 10.0.14393 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "cordova" npm ERR! node v7.8.0 npm ERR! npm v4.2.0

npm ERR! Cannot read property 'path' of null 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:\Users\akarolys\AppData\Roaming\npm-cache_logs\2017-03-29T20_19_27_028Z-debug.log

supporting information:

0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program Files\nodejs\node.exe', 1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'install', 1 verbose cli '-g', 1 verbose cli 'cordova' ] 2 info using npm@4.2.0 3 info using node@v7.8.0 4 silly loadCurrentTree Starting 5 silly install loadCurrentTree 6 silly install readGlobalPackageData 7 silly fetchPackageMetaData cordova 8 silly fetchNamedPackageData cordova 9 silly mapToRegistry name cordova 10 silly mapToRegistry using default registry 11 silly mapToRegistry registry https://registry.npmjs.org/ 12 silly mapToRegistry data Result { 12 silly mapToRegistry raw: 'cordova', 12 silly mapToRegistry scope: null, 12 silly mapToRegistry escapedName: 'cordova', 12 silly mapToRegistry name: 'cordova', 12 silly mapToRegistry rawSpec: '', 12 silly mapToRegistry spec: 'latest', 12 silly mapToRegistry type: 'tag' } 13 silly mapToRegistry uri https://registry.npmjs.org/cordova 14 verbose request uri https://registry.npmjs.org/cordova 15 verbose request no auth needed 16 info attempt registry request try #1 at 2:18:11 PM 17 verbose request id 4f113438943d1c70 18 http request GET https://registry.npmjs.org/cordova 19 info retry will retry, error on last attempt: Error: self signed certificate in certificate chain 20 info attempt registry request try #2 at 2:18:22 PM 21 http request GET https://registry.npmjs.org/cordova 22 info retry will retry, error on last attempt: Error: self signed certificate in certificate chain 23 info attempt registry request try #3 at 2:19:24 PM 24 http request GET https://registry.npmjs.org/cordova 25 silly fetchPackageMetaData Error: self signed certificate in certificate chain 25 silly fetchPackageMetaData at TLSSocket. (_tls_wrap.js:1088:38) 25 silly fetchPackageMetaData at emitNone (events.js:86:13) 25 silly fetchPackageMetaData at TLSSocket.emit (events.js:188:7) 25 silly fetchPackageMetaData at TLSSocket._finishInit (_tls_wrap.js:610:8) 25 silly fetchPackageMetaData at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:440:38) 25 silly fetchPackageMetaData error for cordova { Error: self signed certificate in certificate chain 25 silly fetchPackageMetaData at TLSSocket. (_tls_wrap.js:1088:38) 25 silly fetchPackageMetaData at emitNone (events.js:86:13) 25 silly fetchPackageMetaData at TLSSocket.emit (events.js:188:7) 25 silly fetchPackageMetaData at TLSSocket._finishInit (_tls_wrap.js:610:8) 25 silly fetchPackageMetaData at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:440:38) code: 'SELF_SIGNED_CERT_IN_CHAIN' } 26 silly rollbackFailedOptional Starting 27 verbose stack TypeError: Cannot read property 'path' of null 27 verbose stack at Installer.rollbackFailedOptional (C:\Program Files\nodejs\node_modules\npm\lib\install.js:511:29) 27 verbose stack at Array. (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\bind-actor.js:15:8) 27 verbose stack at LOOP (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\chain.js:15:14) 27 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\chain.js:18:7 27 verbose stack at C:\Program Files\nodejs\node_modules\npm\lib\install.js:337:5 27 verbose stack at Array. (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\bind-actor.js:15:8) 27 verbose stack at LOOP (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\chain.js:15:14) 27 verbose stack at chain (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\chain.js:20:5) 27 verbose stack at C:\Program Files\nodejs\node_modules\npm\lib\install.js:294:5 27 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\chain.js:16:22 28 verbose cwd C:\Users\akarolys 29 error Windows_NT 10.0.14393 30 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "cordova" 31 error node v7.8.0 32 error npm v4.2.0 33 error Cannot read property 'path' of null 34 error If you need help, you may report this error at: 34 error https://github.com/npm/npm/issues 35 verbose exit [ 1, true ]

legodude17 commented 7 years ago

Duplicate of #10686.

Brian-Dennis commented 7 years ago

npm ERR! Cannot read property 'path' of null

You need to add node to your PATH Environmental Variables.

kenany commented 7 years ago

I think this is the issue here:

25 silly fetchPackageMetaData Error: self signed certificate in certificate chain

If npm config set ca "" doesn't help, then you're probably behind some sort of SSL-intercepting proxy, such as Kaspersky.

Karanki commented 7 years ago

Thanks for your help, Brian: Im not sure how to add the node ot my PATH Environmental Varialbes but I will do some reaserch to see if this works for me..

KenanY, I think I am behind an SSL-intercepting proxy. I will have to consult with my staff to fix this issue. thanks for you comments and help in the subject!!

kenany commented 7 years ago

Closing due to no reply after a month.