Open todrobbins opened 5 years ago
Is it my .nvm
setup?
@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).
@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.
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
🤷🏻♂️
@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?
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.
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
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 https://github.com/sharedstreets/trip-simulator/issues/18 is related issue.
Not sure what's wrong on my end, but this is what I get when trying to
npm install -g sharedstreets
: