-1

Error in cmd

C:\Users\user>npm install -g protractor
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "E:\\Software\\nodejs\\node.exe" "E:\\Software\\nodejs\\node_modul
es\\npm\\bin\\npm-cli.js" "install" "-g" "protractor"
npm ERR! node v6.11.1
npm ERR! npm  v3.10.10
npm ERR! code SELF_SIGNED_CERT_IN_CHAIN

npm ERR! self signed certificate in certificate chain
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\user\npm-debug.log

npm-debug.log ----- for reference

0 info it worked if it ends with ok
1 verbose cli [ 'E:\\Software\\nodejs\\node.exe',
1 verbose cli   'E:\\Software\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   '-g',
1 verbose cli   'protractor' ]
2 info using npm@3.10.10
3 info using node@v6.11.1
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData protractor
8 silly fetchNamedPackageData protractor
9 silly mapToRegistry name protractor
10 silly mapToRegistry using default registry
11 silly mapToRegistry registry https://registry.npmjs.org/
12 silly mapToRegistry data Result {
12 silly mapToRegistry   raw: 'protractor',
12 silly mapToRegistry   scope: null,
12 silly mapToRegistry   escapedName: 'protractor',
12 silly mapToRegistry   name: 'protractor',
12 silly mapToRegistry   rawSpec: '',
12 silly mapToRegistry   spec: 'latest',
12 silly mapToRegistry   type: 'tag' }
13 silly mapToRegistry uri https://registry.npmjs.org/protractor
14 verbose request uri https://registry.npmjs.org/protractor
15 verbose request no auth needed
16 info attempt registry request try #1 at 11:52:46 AM
17 verbose request id 91b84aeccc4b259c
18 http request GET https://registry.npmjs.org/protractor
19 info retry will retry, error on last attempt: Error: self signed certificate in certificate chain
20 info attempt registry request try #2 at 11:52:57 AM
21 http request GET https://registry.npmjs.org/protractor
22 info retry will retry, error on last attempt: Error: self signed certificate in certificate chain
23 info attempt registry request try #3 at 11:53:58 AM
24 http request GET https://registry.npmjs.org/protractor
25 silly fetchPackageMetaData Error: self signed certificate in certificate chain
25 silly fetchPackageMetaData     at Error (native)
25 silly fetchPackageMetaData     at TLSSocket.<anonymous> (_tls_wrap.js:1092:38)
25 silly fetchPackageMetaData     at emitNone (events.js:86:13)
25 silly fetchPackageMetaData     at TLSSocket.emit (events.js:185: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 protractor { Error: self signed certificate in certificate chain
25 silly fetchPackageMetaData     at Error (native)
25 silly fetchPackageMetaData     at TLSSocket.<anonymous> (_tls_wrap.js:1092:38)
25 silly fetchPackageMetaData     at emitNone (events.js:86:13)
25 silly fetchPackageMetaData     at TLSSocket.emit (events.js:185: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 silly rollbackFailedOptional Finishing
28 silly runTopLevelLifecycles Finishing
29 silly install printInstalled
30 verbose stack Error: self signed certificate in certificate chain
30 verbose stack     at Error (native)
30 verbose stack     at TLSSocket.<anonymous> (_tls_wrap.js:1092:38)
30 verbose stack     at emitNone (events.js:86:13)
30 verbose stack     at TLSSocket.emit (events.js:185:7)
30 verbose stack     at TLSSocket._finishInit (_tls_wrap.js:610:8)
30 verbose stack     at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:440:38)
31 verbose cwd C:\Users\user
32 error Windows_NT 6.1.7601
33 error argv "E:\\Software\\nodejs\\node.exe" "E:\\Software\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "protractor"
34 error node v6.11.1
35 error npm  v3.10.10
36 error code SELF_SIGNED_CERT_IN_CHAIN
37 error self signed certificate in certificate chain
38 error If you need help, you may report this error at:
38 error     <https://github.com/npm/npm/issues>
39 verbose exit [ 1, true ]

closed as off-topic by IAmMilinPatel, Bharat Mane, Helping Hands, NarendraC, alecxe Aug 1 '17 at 14:01

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about software development unrelated to testing are off-topic here, but can be asked on Stack Overflow." – IAmMilinPatel, Bharat Mane, Helping Hands, NarendraC, alecxe
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    What did you find when you searched for errors with self-signed certificates when installing Protractor? – Kate Paulk Aug 1 '17 at 11:32
1

Are you able to install any other NPM dependency?

Apparently you are using a proxy which blocks NPM somehow. Maybe you could try use

npm config set ca=null

to override it. (Explanation)

  • it didn't work, still, I'm unable to install protractor – ShadowTK Aug 3 '17 at 11:51
  • You are welcome. Could you mark the answer as accepted? – João Farias Aug 4 '17 at 16:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.