Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

certificate error #14667

Closed
3 of 13 tasks
subbuchaudhary opened this issue Nov 18, 2016 · 11 comments
Closed
3 of 13 tasks

certificate error #14667

subbuchaudhary opened this issue Nov 18, 2016 · 11 comments

Comments

@subbuchaudhary
Copy link

subbuchaudhary commented Nov 18, 2016

npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "jshint"
npm ERR! node v5.7.1
npm ERR! npm  v3.6.0
npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! unable to get local issuer certificate

I'm opening this issue because:

  • npm is crashing.
  • npm is producing an incorrect install.
  • npm is doing something I don't understand.
  • Other (see below for feature requests):

What's going wrong?

How can the CLI team reproduce the problem?

supporting information:

  • npm -v prints:
  • node -v prints:
  • npm config get registry prints:
  • Windows, OS X/macOS, or Linux?:
  • Network issues:
    • Geographic location where npm was run:
    • I use a proxy to connect to the npm registry.
    • I use a proxy to connect to the web.
    • I use a proxy when downloading Git repos.
    • I access the npm registry via a VPN
    • I don't use a proxy, but have limited or unreliable internet access.
  • Container:
    • I develop using Vagrant on Windows.
    • I develop using Vagrant on OS X or Linux.
    • I develop / deploy using Docker.
    • I deploy to a PaaS (Triton, Heroku).
@legodude17
Copy link
Contributor

Please fill out the issue template and then ping me when you do. Thanks for you cooperation!

@subbuchaudhary
Copy link
Author

subbuchaudhary commented Nov 18, 2016

@legodude17 @kenany
Supporting Information:
Mac OSX El Capitan version 10.11.6 (Macbook pro)

$npm -v
3.6.0
$node -v
v5.7.1
$ npm config get proxy
null
$ echo $PATH
/Users/username/npm-global/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
$ npm config get prefix
/Users/username/npm-global
$ cat ~/.profile
export PATH=/Users/username/npm-global/bin:$PATH
$ npm config ls
; cli configs
user-agent = "npm/3.6.0 node/v5.7.1 darwin x64"

; userconfig /Users/username/.npmrc
prefix = "/Users/username/npm-global"

; node bin location = /usr/local/bin/node
; cwd = /Users/username/npm-global
; HOME = /Users/username
; "npm config ls -l" to show all defaults.

@legodude17
Copy link
Contributor

Can you please put the npm-debug.log in a gist and then post the link?

@subbuchaudhary
Copy link
Author

subbuchaudhary commented Nov 18, 2016

@legodude17 @kenany
npm-debug.log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'install',
1 verbose cli   '-g',
1 verbose cli   'jshint' ]
2 info using npm@3.6.0
3 info using node@v5.7.1
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData jshint
8 silly fetchNamedPackageData jshint
9 silly mapToRegistry name jshint
10 silly mapToRegistry using default registry
11 silly mapToRegistry registry https://registry.npmjs.org/
12 silly mapToRegistry uri https://registry.npmjs.org/jshint
13 verbose request uri https://registry.npmjs.org/jshint
14 verbose request no auth needed
15 info attempt registry request try #1 at 4:19:39 PM
16 verbose request id a81c014d2645a8d1
17 http request GET https://registry.npmjs.org/jshint
18 info retry will retry, error on last attempt: Error: unable to get local issuer certificate
19 info attempt registry request try #2 at 4:19:49 PM
20 http request GET https://registry.npmjs.org/jshint
21 info retry will retry, error on last attempt: Error: unable to get local issuer certificate
22 info attempt registry request try #3 at 4:20:50 PM
23 http request GET https://registry.npmjs.org/jshint
24 silly fetchPackageMetaData Error: unable to get local issuer certificate
24 silly fetchPackageMetaData     at Error (native)
24 silly fetchPackageMetaData     at TLSSocket.<anonymous> (_tls_wrap.js:1061:38)
24 silly fetchPackageMetaData     at emitNone (events.js:80:13)
24 silly fetchPackageMetaData     at TLSSocket.emit (events.js:179:7)
24 silly fetchPackageMetaData     at TLSSocket._init.ssl.onclienthello.ssl.oncertcb.TLSSocket._finishInit (_tls_wrap.js:593:8)
24 silly fetchPackageMetaData     at TLSWrap.ssl.onclienthello.ssl.oncertcb.ssl.onnewsession.ssl.onhandshakedone (_tls_wrap.js:425:38)
24 silly fetchPackageMetaData  error for jshint { [Error: unable to get local issuer certificate] code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY' }
25 silly rollbackFailedOptional Starting
26 silly rollbackFailedOptional Finishing
27 silly runTopLevelLifecycles Starting
28 silly runTopLevelLifecycles Finishing
29 silly install printInstalled
30 verbose stack Error: unable to get local issuer certificate
30 verbose stack     at Error (native)
30 verbose stack     at TLSSocket.<anonymous> (_tls_wrap.js:1061:38)
30 verbose stack     at emitNone (events.js:80:13)
30 verbose stack     at TLSSocket.emit (events.js:179:7)
30 verbose stack     at TLSSocket._init.ssl.onclienthello.ssl.oncertcb.TLSSocket._finishInit (_tls_wrap.js:593:8)
30 verbose stack     at TLSWrap.ssl.onclienthello.ssl.oncertcb.ssl.onnewsession.ssl.onhandshakedone (_tls_wrap.js:425:38)
31 verbose cwd /Users/username
32 error Darwin 15.6.0
33 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "jshint"
34 error node v5.7.1
35 error npm  v3.6.0
36 error code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
37 error unable to get local issuer certificate
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 ]

@legodude17
Copy link
Contributor

Did you make sure to build nodejs with crypto?

@subbuchaudhary
Copy link
Author

@legodude17 what does it meant by?
I did not get you?

@subbuchaudhary
Copy link
Author

@legodude17
i tried
$npm install crypto-js
it also gave same error

@legodude17
Copy link
Contributor

If you don't understand, it is fine. How did you install nodejs and npm?

@subbuchaudhary
Copy link
Author

@legodude17
I simply downloaded nodev5.7.1.pkg file from nodejs.org and installed it. then i set the npm permissions as shown in npm documentation web site.

@othiym23 othiym23 changed the title npm ERR! Darwin 15.6.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "jshint" npm ERR! node v5.7.1 npm ERR! npm v3.6.0 npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY npm ERR! unable to get local issuer certificate certificate error Nov 18, 2016
@subbuchaudhary
Copy link
Author

@legodude17 @kenany @othiym23
Is there any solution for my error?

@subbuchaudhary
Copy link
Author

subbuchaudhary commented Nov 19, 2016

@legodude17 @othiym23
Thanks for spending your valuable time for me
This command solved my issue
npm config set strict-ssl false

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants