I've suddenly run into issues installing sqlite3 on a Windows 10, 64-bit machine with the latest version of Node 8 (v8.11.1). I'm getting the same issue with both sqlite3 v3.1.13 and v4.0.0.
I've been using v3.1.13 successfully for months with node v8 without issue. So, something must have recently changed to cause this issue.
I've pasted the error I'm getting below (sorry it's so long, I decided to follow the advice in https://github.com/mapbox/node-sqlite3/wiki/Binaries and use --log-level=info).
Any chance you can help me understand what's going wrong?
PS C:\Users\Dan\Documents\test-project> npm install --save sqlite3 --loglevel=info
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm http fetch GET 304 http://registry.npmjs.org/sqlite3 147ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/nan 45ms (from cache)
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
> [email protected] install C:\Users\Dan\Documents\test-project\node_modules\sqlite3
> node-pre-gyp install --fallback-to-build
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | win32 | x64
node-pre-gyp info check checked for "C:\Users\Dan\Documents\test-project\node_modules\sqlite3\lib\binding\node-v57-win32-x64\node_sqlite3.node" (not found)
node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.0.0/node-v57-win32-x64.tar.gz
node-pre-gyp ERR! Completion callback never invoked!
node-pre-gyp ERR! System Windows_NT 10.0.16299
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Dan\\Documents\\test-project\\node_modules\\sqlite3\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\Dan\Documents\test-project\node_modules\sqlite3
node-pre-gyp ERR! node -v v8.11.1
node-pre-gyp ERR! node-pre-gyp -v v0.9.0
node-pre-gyp ERR! This is a bug in `node-pre-gyp`.
node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help:
node-pre-gyp ERR! <https://github.com/mapbox/node-pre-gyp/issues>
npm info lifecycle [email protected]~install: Failed to exec install script
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 6
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 6
npm ERR!
npm ERR! Failed at the [email protected] 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! C:\Users\Dan\AppData\Roaming\npm-cache\_logs\2018-03-30T22_14_26_707Z-debug.log
I just tried uninstalling node 8.11.1 and installing 7.10.1, but this did not solve the problem (for either [email protected] or 4.0.0).
You are running [email protected]. I recommend downgrading to npm@3 - see if that fixes it.
@springmeyer,
Thanks for your speedy reply. Unfortunately, I have the same problem with node 8.11.1 and npm 3.10.10.
Or should I be trying node 7 and npm 3?
@springmeyer, I tried a few other combinations, but they also failed with the same errors:
It really seems like something is broken with node-pre-gyp, which was updated 3 times in the past 3 weeks. It could be coincidence, but the last time I attempted an npm install of sqlite3 was over 3 weeks ago, and I had no issue (and that was with pretty recent versions of node and npm).
Definitely appreciate any help you can provide. I've been at this most of the day, and I'm very anxious to find a solution.
@devuxer sorry about the trouble. I think your hunch is good since the error is coming from https://github.com/mapbox/node-pre-gyp/blob/master/bin/node-pre-gyp#L100-L106.
To try to isolate node-pre-gyp can you try:
npm install (inside the node-sqlite3 directory) and confirm the build error still happens"node-pre-gyp": "~0.6.38"npm cache cleannpm install (inside the node-sqlite3 directory)@springmeyer,
So, I just tried cloning and running npm install, and I actually didn't get an error. Then I tried installing sqlite3@latest in my project again, and it worked! (Note that I'm back on Node 8.11.1 and [email protected], so using more recent versions apparently wasn't the cause of the errors.)
I'm a little baffled, but I can think of three possible reasons it started working again:
In any case, I'll close this for now, since it seems to be something peculiar to my machine/configuration.
Thanks again for your responsiveness!
@springmeyer,
Just FYI (and in case it helps someone else with a similar problem), I figured it out.
My office network blocks access to any unknown/suspicious domains, and apparently, it was blocking node-pre-gyp's attempt to perform an HTTP GET from https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.0.0/node-v57-win32-x64.tar.gz.
So, I just needed to ask IT to allow amazonaws.com, and at last, the package installed successfully!
Had the same issue due to a corporate client running McAfee Gateway, which rather in a rather spectacularly insecure manner decrypts all https and sniffs then resigns everything (without checking if the proxy source is signed correctly of course) ...
Had to turn off node sign checking to get the script to work
Set NODE_TLS_REJECT_UNAUTHORIZED=0
npm install sqlite3
additionally looks like https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.0.0/node-v64-win32-x64.tar.gz is now 403ing all traffic (maybe although it's just the re-writting gateway ! although it's marginally better than one proxy i had to work through that was corrupting jpegs and zip, that contained naughty words sequences in their binary )
was still having troubles to do with python binary zip being corrupted by the proxy (midway through " npm install --global --production windows-build-tools" it was redirecting zip to a html page with javascript doing things...) but i just installed it manually from "https://www.python.org/downloads/release/python-365/"
https://nodejs.org/dist/v10.2.0/
node-v10.2.0-x64.msi
try download that, it worked for me
Most helpful comment
Had the same issue due to a corporate client running McAfee Gateway, which rather in a rather spectacularly insecure manner decrypts all https and sniffs then resigns everything (without checking if the proxy source is signed correctly of course) ...
Had to turn off node sign checking to get the script to work
additionally looks like https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.0.0/node-v64-win32-x64.tar.gz is now 403ing all traffic (maybe although it's just the re-writting gateway ! although it's marginally better than one proxy i had to work through that was corrupting jpegs and zip, that contained naughty words sequences in their binary )
was still having troubles to do with python binary zip being corrupted by the proxy (midway through " npm install --global --production windows-build-tools" it was redirecting zip to a html page with javascript doing things...) but i just installed it manually from "https://www.python.org/downloads/release/python-365/"