Skip to content

Critical: npm install fails #2104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
maxbruggem opened this issue Oct 19, 2017 · 5 comments
Closed

Critical: npm install fails #2104

maxbruggem opened this issue Oct 19, 2017 · 5 comments

Comments

@maxbruggem
Copy link

Steps to reproduce:
Create a new directory and npm --init
npm install --save plotly.js

npm ERR! Error while executing:
npm ERR! C:\Program Files\Git\cmd\git.EXE ls-remote -h -t ssh://[email protected]/mapbox/mapbox-gl-style-spec.git
npm ERR!
npm ERR! Host key verification failed.
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128

Also fails with yarn. Performing the action:
yarn add plotly.js
gives the error:
error Couldn't find match for "83b1a3e5837d785af582efd5ed1a212f2df6a4ae" in "_c" for "https://github.com/mapbox/mapbox-gl-style-spec.git".

@etpinard
Copy link
Contributor

etpinard commented Oct 19, 2017

What version of npm are you using ❓

Might be related to #1745

@maxbruggem
Copy link
Author

npm version 5.5.1

@rreusser
Copy link
Contributor

rreusser commented Oct 19, 2017

The issue seems to be with these lines that install dependencies from github directly. It looks like there's a problem fetching those via ssh. It's not quite the same as this issue, but perhaps similar.

To solve, this, it looks like a couple places to start would be:

  1. ~/.ssh/known_hosts (or the windows equivalent). Sometimes out-of-sync keys there can cause otherwise fine ssh operations to fail. Sometimes you just have to delete offending entries.
  2. Do you have a github account? I wonder if that's necessary in order for it to fetch npm modules from github via ssh. If necessary, it might be possible to just create a dummy account and set up ssh.

@maxbruggem
Copy link
Author

It looks like having a github account setup with ssh keys is necessary. I setup my github account to recognise the ssh keys on my computer and was able to install the package successfully. Closing this issue because install was successful.

@lnunno
Copy link

lnunno commented Jan 11, 2018

I'm seeing something similar with a self-signed cert using yarn:

verbose 3.454 Request "http://registry.npmjs.org/functional-red-black-tree" finished with status code 200.
verbose 3.459 Request "http://registry.npmjs.org/core-js" finished with status code 200.
verbose 3.461 Request "http://registry.npmjs.org/robust-product" finished with status code 200.
verbose 3.463 Error: unable to get local issuer certificate
    at Error (native)
    at TLSSocket.<anonymous> (_tls_wrap.js:1092:38)
    at emitNone (events.js:86:13)
    at TLSSocket.emit (events.js:185:7)
    at TLSSocket._finishInit (_tls_wrap.js:610:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:440:38)
error An unexpected error occurred: "https://github.com/mapbox/mapbox-gl-shaders: unable to get local issuer certificate".
info If you think this is a bug, please open a bug report with the information provided in "/jade/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: unable to get local issuer certificate
    at Error (native)
    at TLSSocket.<anonymous> (_tls_wrap.js:1092:38)
    at emitNone (events.js:86:13)
    at TLSSocket.emit (events.js:185:7)
    at TLSSocket._finishInit (_tls_wrap.js:610:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:440:38)

I think it's due to the way plotly is gathering its dependencies.

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

No branches or pull requests

4 participants