Skip to content
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

install fails at osrm #54

Open
todrobbins opened this issue May 22, 2019 · 8 comments
Open

install fails at osrm #54

todrobbins opened this issue May 22, 2019 · 8 comments

Comments

@todrobbins
Copy link

Not sure what's wrong on my end, but this is what I get when trying to npm install -g sharedstreets:

➜  Desktop npm install -g sharedstreets
/Users/todrobbins/.nvm/versions/node/v12.2.0/bin/shst -> /Users/todrobbins/.nvm/versions/node/v12.2.0/lib/node_modules/sharedstreets/bin/run

> leveldown@5.1.0 install /Users/todrobbins/.nvm/versions/node/v12.2.0/lib/node_modules/sharedstreets/node_modules/leveldown
> node-gyp-build


> osrm@5.22.0 install /Users/todrobbins/.nvm/versions/node/v12.2.0/lib/node_modules/sharedstreets/node_modules/osrm
> node-pre-gyp install --fallback-to-build=false || ./scripts/node_install.sh

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp ERR! install error
node-pre-gyp ERR! stack Error: 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/osrm/v5.22.0/Release/node-v72-darwin-x64.tar.gz
node-pre-gyp ERR! stack     at PassThrough.<anonymous> (/Users/todrobbins/.nvm/versions/node/v12.2.0/lib/node_modules/sharedstreets/node_modules/osrm/node_modules/node-pre-gyp/lib/install.js:149:27)
node-pre-gyp ERR! stack     at PassThrough.emit (events.js:201:15)
node-pre-gyp ERR! stack     at ClientRequest.<anonymous> (/Users/todrobbins/.nvm/versions/node/v12.2.0/lib/node_modules/sharedstreets/node_modules/osrm/node_modules/needle/lib/needle.js:482:9)
node-pre-gyp ERR! stack     at Object.onceWrapper (events.js:284:20)
node-pre-gyp ERR! stack     at ClientRequest.emit (events.js:196:13)
node-pre-gyp ERR! stack     at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:572:23)
node-pre-gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:116:17)
node-pre-gyp ERR! stack     at TLSSocket.socketOnData (_http_client.js:459:22)
node-pre-gyp ERR! stack     at TLSSocket.emit (events.js:196:13)
node-pre-gyp ERR! stack     at addChunk (_stream_readable.js:290:12)
node-pre-gyp ERR! System Darwin 18.5.0
node-pre-gyp ERR! command "/Users/todrobbins/.nvm/versions/node/v12.2.0/bin/node" "/Users/todrobbins/.nvm/versions/node/v12.2.0/lib/node_modules/sharedstreets/node_modules/osrm/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build=false"
node-pre-gyp ERR! cwd /Users/todrobbins/.nvm/versions/node/v12.2.0/lib/node_modules/sharedstreets/node_modules/osrm
node-pre-gyp ERR! node -v v12.2.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/osrm/v5.22.0/Release/node-v72-darwin-x64.tar.gz
~/.nvm/versions/node/v12.2.0/lib/node_modules/sharedstreets/node_modules/osrm/build ~/.nvm/versions/node/v12.2.0/lib/node_modules/sharedstreets/node_modules/osrm
CMake Error: The source directory "/Users/todrobbins/.nvm/versions/node/v12.2.0/lib/node_modules/sharedstreets/node_modules/osrm" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! osrm@5.22.0 install: `node-pre-gyp install --fallback-to-build=false || ./scripts/node_install.sh`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the osrm@5.22.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
@todrobbins
Copy link
Author

Is it my .nvm setup?

@kpwebb
Copy link
Member

kpwebb commented May 22, 2019

@todrobbins it looks like you might be running on a much older version of Node (v7.2?) can you confirm if this is the case?

The CLI currently requires node v10+ (it should do a check during install).

@kpwebb
Copy link
Member

kpwebb commented May 22, 2019

@todrobbins FYI, i've just added Docker setup steps to the README:

https://github.com/sharedstreets/sharedstreets-js/blob/master/README.md#docker

You should be able to use locally if you can upgrade Node, or use these.

@todrobbins
Copy link
Author

todrobbins commented May 22, 2019

I think you're right, I show the following for node/npm:

➜  which node
/Users/todrobbins/.nvm/versions/node/v12.2.0/bin/node
➜  which npm
/Users/todrobbins/.nvm/versions/node/v12.2.0/bin/npm

And:

➜  node -v
v12.2.0
➜  npm -v
6.9.0

🤷🏻‍♂️

@kpwebb
Copy link
Member

kpwebb commented May 23, 2019

@todrobbins not sure what's happening there -- the node version does show v12.2 but it looks like it's attempting to download OSRM for node v7.2:

https://mapbox-node-binary.s3.amazonaws.com/osrm/v5.22.0/Release/node-v72-darwin-x64.tar.gz

Not sure why that's happening but might be related to a conflict between nvm and another installed version of node?

@kpwebb
Copy link
Member

kpwebb commented May 23, 2019

Strike that: looks like the v72 in the URL is the "node module version" which is Node v12.2. It appears that Mapbox hasn't released OSRM binaries for Node v12 yet. We'll update the docs to reflect this.

@hbruch
Copy link

hbruch commented Sep 29, 2019

I ran into the same issue (node 12 instead of 10).

With nvm, I was able to install an additional node10 version:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
nvm install 10
nvm use 10

@TyceHerrman
Copy link

TyceHerrman commented Aug 13, 2020

I was able to successfully use the CLI after installing node11 with nvm. I had the same issue as others when using the most recent version of node (node14). I didn't attempt to use the CLI with node12. Seems sharedstreets/trip-simulator#18 is related issue.

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