askmike / gekko

A bitcoin trading bot written in node - https://gekko.wizb.it/
MIT License
10.08k stars 3.93k forks source link

Sqlite3 error with node v12.6.0 #2824

Closed ar-to closed 5 years ago

ar-to commented 5 years ago

Note: this is the technical bug tracker, please use other platforms for getting support and starting a (non technical) discussion. See the getting help page for details.

I'm submitting a ... [x] bug report [ ] question about the decisions made in the repository

Action taken (what you did) npm install --only=production

Expected result (what you hoped would happen)


> sqlite3@4.0.4 install /Users/ar/gekko/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download 
[sqlite3] Success: "/Users/ar/gekko/node_modules/sqlite3/lib/binding/node-v59-darwin-x64/node_sqlite3.node" is installed via remote
added 44 packages in 2.916s

Actual result (unexpected outcome)

gypgyp  ERR! ERR!build error  
build error 
gypgyp  ERR!ERR!  stackstack Error: `make` failed with exit code: 2
 Error: `make` failed with exit code: 2
gypgyp  ERR!ERR!  stackstack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gypgyp  ERR!ERR!  stackstack     at ChildProcess.emit (events.js:203:13)
     at ChildProcess.emit (events.js:203:13)
gypgyp  ERR!ERR!  stackstack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gypgyp  ERR!ERR! System Darwin 18.6.0
gyp ERR! command "/usr/local/Cellar/node/12.6.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/ar/gekko/node_modules/sqlite3/lib/binding/node-v72-darwin-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/Users/ar/gekko/node_modules/sqlite3/lib/binding/node-v72-darwin-x64" "--napi_version=4" "--node_abi_napi=napi"
gyp ERR! cwd /Users/ar/gekko/node_modules/sqlite3
gyp ERR! node -v v12.6.0
gyp  ERR!System  Darwin 18.6.0
node-gyp -v v3.8.0
gyp gypERR!  not okERR! 
 command "/usr/local/Cellar/node/12.6.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/ar/gekko/node_modules/sqlite3/lib/binding/node-v72-darwin-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/Users/ar/gekko/node_modules/sqlite3/lib/binding/node-v72-darwin-x64" "--napi_version=4" "--node_abi_napi=napi"
gyp ERR! cwd /Users/ar/gekko/node_modules/sqlite3
gyp ERR! node -v v12.6.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/12.6.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/ar/gekko/node_modules/sqlite3/lib/binding/node-v72-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/ar/gekko/node_modules/sqlite3/lib/binding/node-v72-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/ar/gekko/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:203:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Darwin 18.6.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/12.6.0/bin/node" "/Users/ar/gekko/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/ar/gekko/node_modules/sqlite3
node-pre-gyp ERR! node -v v12.6.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/Cellar/node/12.6.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/ar/gekko/node_modules/sqlite3/lib/binding/node-v72-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/ar/gekko/node_modules/sqlite3/lib/binding/node-v72-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sqlite3@4.0.4 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sqlite3@4.0.4 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/ar/.npm/_logs/2019-07-20T04_06_27_750Z-debug.log

Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc)

I ended up realizing the problem was with the node version I was using, which was 12.6.0. I used nvm to change it to v9.2.0 and it worked as expected.

This can be related to the following issues but I did not find this exact problem. [#2282][#1380][#2626]

This issue can be closed by a maintainer unless I missed something. Its meant to help anyone without having to dig through the forum or bug others in the same question in the chatroom.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you feel this is very a important issue please reach out the maintainer of this project directly via e-mail: gekko at mvr dot me.