Unable to install sqlite3 for node-webkit
Log:
Input:
npm install sqlite3 --build-from-source --runtime=node-webkit --target_arch=ia32 --target="0.9.2"
Output
npm http GET https://registry.npmjs.org/sqlite3
npm http 304 https://registry.npmjs.org/sqlite3
> [email protected] install /Users/loganengstrom/Documents/projects/trustee/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'nw-gyp rebuild --name=sqlite3 --configuration=Release --module_name=node_sqlite3 --version=2.2.3 --major=2 --minor=2 --patch=3 --runtime=node-webkit --node_abi=node-webkit-v13 --target=0.9.2 --platform=darwin --arch=ia32 --target_arch=ia32 --module_main=./lib/sqlite3 --host=https://node-sqlite3.s3.amazonaws.com/ --module_path=/Users/loganengstrom/Documents/projects/trustee/node_modules/sqlite3/lib/binding/node-webkit-v13-darwin-ia32 --remote_path=./Release/ --package_name=node_sqlite3-v2.2.3-node-webkit-v13-darwin-ia32.tar.gz --staged_tarball=build/stage/Release/node_sqlite3-v2.2.3-node-webkit-v13-darwin-ia32.tar.gz --hosted_path=https://node-sqlite3.s3.amazonaws.com/Release/ --hosted_tarball=https://node-sqlite3.s3.amazonaws.com/Release/node_sqlite3-v2.2.3-node-webkit-v13-darwin-ia32.tar.gz' (Error: spawn ENOENT)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/loganengstrom/Documents/projects/trustee/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:70:29)
node-pre-gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:95:17)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:805:12)
node-pre-gyp ERR! System Darwin 13.1.0
node-pre-gyp ERR! command "node" "/Users/loganengstrom/Documents/projects/trustee/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/loganengstrom/Documents/projects/trustee/node_modules/sqlite3
node-pre-gyp ERR! node -v v0.10.28
node-pre-gyp ERR! node-pre-gyp -v v0.5.9
node-pre-gyp ERR! not ok
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the sqlite3 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR! npm owner ls sqlite3
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "sqlite3" "--build-from-source" "--runtime=node-webkit" "--target_arch=ia32" "--target=0.9.2"
npm ERR! cwd /Users/loganengstrom/Documents/projects/trustee/node_modules
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/loganengstrom/Documents/projects/trustee/node_modules/npm-debug.log
npm ERR! not ok code 0
Is there any particular reason why this is happening? I was unable to build anything in the same manner (switching versions did not help)
sqlite3 only supports versions of node >= 0.11.13, 0.8.x and 0.10.x. Node webkit 0.9.2 is based off of node 0.11.9 and is not supported and from what I've read it won't be supported. So you can try building for node webkit 0.10.0-rc1 or going back to 0.8.6. Note that I am not sure if the current version of the package in npm will build for nw 0.8.6 but I am sure it will not build for 0.10. You can try installing from the master branch and that should fix the issues for nw 0.8.6, if there are. If you still have issues building for 0.10.0-rc1 install the from the travis refactor branch. If you just want to play it safe use nw 0.8.5 or 0.8.4 they work flawlessly with the version currently in npm(at least for me).
P.S Don't enclose the nw version in quotations marks, I am not sure if it will work that way, it may but it may not. Give it a go without the quotations marks.
That's right.
Node.js 0.11.x versions prior to 0.11.13 are not supported because nan package version 1.0.0 does not support them, see https://github.com/mapbox/node-sqlite3/pull/184#issuecomment-46647823 for details.
Closing, won't fix.