urbica / galton

Lightweight Node.js isochrone map server
https://galton.urbica.co
MIT License
271 stars 36 forks source link

Build failure on macosx #244

Closed jeantristan closed 5 years ago

jeantristan commented 5 years ago

Hello,

Trying to install galton using git clone then npm install failed on my macos.

npm version : 6.9.0

mbpt:galton chanegue$ npm install
npm WARN deprecated hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated boom@2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated sntp@1.0.9: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated cryptiles@2.0.5: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated hoek@2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).

> osrm@5.19.0 install /Users/chanegue/Code/galton/node_modules/osrm
> node-pre-gyp install --fallback-to-build=false || ./scripts/node_install.sh

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.19.0/Release/node-v67-darwin-x64.tar.gz
node-pre-gyp ERR! stack     at Request.<anonymous> (/Users/chanegue/Code/galton/node_modules/osrm/node_modules/node-pre-gyp/lib/install.js:118:27)
node-pre-gyp ERR! stack     at Request.emit (events.js:198:15)
node-pre-gyp ERR! stack     at Request.onRequestResponse (/Users/chanegue/Code/galton/node_modules/osrm/node_modules/request/request.js:1074:10)
node-pre-gyp ERR! stack     at ClientRequest.emit (events.js:193:13)
node-pre-gyp ERR! stack     at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:560:23)
node-pre-gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:113:17)
node-pre-gyp ERR! stack     at TLSSocket.socketOnData (_http_client.js:447:22)
node-pre-gyp ERR! stack     at TLSSocket.emit (events.js:193:13)
node-pre-gyp ERR! stack     at addChunk (_stream_readable.js:295:12)
node-pre-gyp ERR! stack     at readableAddChunk (_stream_readable.js:276:11)
node-pre-gyp ERR! System Darwin 18.5.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/11.14.0_1/bin/node" "/Users/chanegue/Code/galton/node_modules/osrm/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build=false"
node-pre-gyp ERR! cwd /Users/chanegue/Code/galton/node_modules/osrm
node-pre-gyp ERR! node -v v11.14.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok 
403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/osrm/v5.19.0/Release/node-v67-darwin-x64.tar.gz
~/Code/galton/node_modules/osrm/build ~/Code/galton/node_modules/osrm
CMake Error: The source directory "/Users/chanegue/Code/galton/node_modules/osrm" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
npm WARN acorn-jsx@5.0.1 requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! osrm@5.19.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.19.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/chanegue/.npm/_logs/2019-05-17T14_08_54_084Z-debug.log
mbpt:galton chanegue$ 

Do you have any idea of what's wrong ?

stepankuzmin commented 5 years ago

Hey @jeantristan! It seems that you are using Node v11. Unfortunately, osrm@5.19.0 requires Node v8. Could you please try this version?

jeantristan commented 5 years ago

Totally sorry. It's written at the beginning of your documentation. You were right.

If some mac user needs info about it: https://apple.stackexchange.com/questions/171530/how-do-i-downgrade-node-or-install-a-specific-previous-version-using-homebrew

But now I have another error:

> galton@5.19.0-beta.2 prepublish /Users/chanegue/Code/galton
> npm run snyk-protect

> galton@5.19.0-beta.2 snyk-protect /Users/chanegue/Code/galton
> snyk protect

An unknown error occurred. Please include the trace below when reporting to Snyk:

Error: 500
    at request (/Users/chanegue/Code/galton/node_modules/snyk/src/lib/snyk-test/run-test.ts:150:21)
    at /Users/chanegue/Code/galton/node_modules/snyk/src/lib/request/index.js:12:9
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! galton@5.19.0-beta.2 snyk-protect: `snyk protect`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the galton@5.19.0-beta.2 snyk-protect script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/chanegue/.npm/_logs/2019-05-17T16_35_35_880Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! galton@5.19.0-beta.2 prepublish: `npm run snyk-protect`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the galton@5.19.0-beta.2 prepublish script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/chanegue/.npm/_logs/2019-05-17T16_35_35_944Z-debug.log

And at the end of the debug file:

3056 verbose stack Error: galton@5.19.0-beta.2 prepublish: `npm run snyk-protect`
3056 verbose stack Exit status 1
3056 verbose stack     at EventEmitter.<anonymous> (/usr/local/Cellar/node@8/8.16.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
3056 verbose stack     at emitTwo (events.js:126:13)
3056 verbose stack     at EventEmitter.emit (events.js:214:7)
3056 verbose stack     at ChildProcess.<anonymous> (/usr/local/Cellar/node@8/8.16.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
3056 verbose stack     at emitTwo (events.js:126:13)
3056 verbose stack     at ChildProcess.emit (events.js:214:7)
3056 verbose stack     at maybeClose (internal/child_process.js:915:16)
3056 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
3057 verbose pkgid galton@5.19.0-beta.2
3058 verbose cwd /Users/chanegue/Code/galton
3059 verbose Darwin 18.5.0
3060 verbose argv "/usr/local/Cellar/node@8/8.16.0/bin/node" "/usr/local/bin/npm" "install"
3061 verbose node v8.16.0
3062 verbose npm  v6.4.1
3063 error code ELIFECYCLE
3064 error errno 1
3065 error galton@5.19.0-beta.2 prepublish: `npm run snyk-protect`
3065 error Exit status 1
3066 error Failed at the galton@5.19.0-beta.2 prepublish script.
3066 error This is probably not a problem with npm. There is likely additional logging output above.
3067 verbose exit [ 1, true ]

Any clue?

jeantristan commented 5 years ago

Got it working thanks to the following command before npm install:

npm run snyk-protect