Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to npm install on Windows (64-bit) Node v8 #961

Closed
devuxer opened this issue Mar 30, 2018 · 9 comments
Closed

Unable to npm install on Windows (64-bit) Node v8 #961

devuxer opened this issue Mar 30, 2018 · 9 comments

Comments

@devuxer
Copy link

devuxer commented Mar 30, 2018

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.

#825 (which @springmeyer closed on 30 May 2017) leads me to believe this should work, despite the readme only listing Node.js v4-7 as supported platforms.

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 npm@5.8.0
npm info using node@v8.11.1
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 abbrev@1.1.1~preinstall: abbrev@1.1.1
npm info lifecycle ansi-regex@2.1.1~preinstall: ansi-regex@2.1.1
npm info lifecycle aproba@1.2.0~preinstall: aproba@1.2.0
npm info lifecycle balanced-match@1.0.0~preinstall: balanced-match@1.0.0
npm info lifecycle chownr@1.0.1~preinstall: chownr@1.0.1
npm info lifecycle code-point-at@1.1.0~preinstall: code-point-at@1.1.0
npm info lifecycle concat-map@0.0.1~preinstall: concat-map@0.0.1
npm info lifecycle brace-expansion@1.1.11~preinstall: brace-expansion@1.1.11
npm info lifecycle console-control-strings@1.1.0~preinstall: console-control-strings@1.1.0
npm info lifecycle core-util-is@1.0.2~preinstall: core-util-is@1.0.2
npm info lifecycle deep-extend@0.4.2~preinstall: deep-extend@0.4.2
npm info lifecycle delegates@1.0.0~preinstall: delegates@1.0.0
npm info lifecycle detect-libc@1.0.3~preinstall: detect-libc@1.0.3
npm info lifecycle fs.realpath@1.0.0~preinstall: fs.realpath@1.0.0
npm info lifecycle has-unicode@2.0.1~preinstall: has-unicode@2.0.1
npm info lifecycle iconv-lite@0.4.19~preinstall: iconv-lite@0.4.19
npm info lifecycle inherits@2.0.3~preinstall: inherits@2.0.3
npm info lifecycle ini@1.3.5~preinstall: ini@1.3.5
npm info lifecycle isarray@1.0.0~preinstall: isarray@1.0.0
npm info lifecycle minimatch@3.0.4~preinstall: minimatch@3.0.4
npm info lifecycle ignore-walk@3.0.1~preinstall: ignore-walk@3.0.1
npm info lifecycle minimist@0.0.8~preinstall: minimist@0.0.8
npm info lifecycle mkdirp@0.5.1~preinstall: mkdirp@0.5.1
npm info lifecycle ms@2.0.0~preinstall: ms@2.0.0
npm info lifecycle debug@2.6.9~preinstall: debug@2.6.9
npm info lifecycle npm-bundled@1.0.3~preinstall: npm-bundled@1.0.3
npm info lifecycle npm-packlist@1.1.10~preinstall: npm-packlist@1.1.10
npm info lifecycle number-is-nan@1.0.1~preinstall: number-is-nan@1.0.1
npm info lifecycle is-fullwidth-code-point@1.0.0~preinstall: is-fullwidth-code-point@1.0.0
npm info lifecycle object-assign@4.1.1~preinstall: object-assign@4.1.1
npm info lifecycle os-homedir@1.0.2~preinstall: os-homedir@1.0.2
npm info lifecycle os-tmpdir@1.0.2~preinstall: os-tmpdir@1.0.2
npm info lifecycle osenv@0.1.5~preinstall: osenv@0.1.5
npm info lifecycle nopt@4.0.1~preinstall: nopt@4.0.1
npm info lifecycle path-is-absolute@1.0.1~preinstall: path-is-absolute@1.0.1
npm info lifecycle process-nextick-args@2.0.0~preinstall: process-nextick-args@2.0.0
npm info lifecycle minimist@1.2.0~preinstall: minimist@1.2.0
npm info lifecycle safe-buffer@5.1.1~preinstall: safe-buffer@5.1.1
npm info lifecycle sax@1.2.4~preinstall: sax@1.2.4
npm info lifecycle needle@2.2.0~preinstall: needle@2.2.0
npm info lifecycle semver@5.5.0~preinstall: semver@5.5.0
npm info lifecycle set-blocking@2.0.0~preinstall: set-blocking@2.0.0
npm info lifecycle signal-exit@3.0.2~preinstall: signal-exit@3.0.2
npm info lifecycle string_decoder@1.0.3~preinstall: string_decoder@1.0.3
npm info lifecycle strip-ansi@3.0.1~preinstall: strip-ansi@3.0.1
npm info lifecycle string-width@1.0.2~preinstall: string-width@1.0.2
npm info lifecycle strip-json-comments@2.0.1~preinstall: strip-json-comments@2.0.1
npm info lifecycle rc@1.2.6~preinstall: rc@1.2.6
npm info lifecycle util-deprecate@1.0.2~preinstall: util-deprecate@1.0.2
npm info lifecycle readable-stream@2.3.5~preinstall: readable-stream@2.3.5
npm info lifecycle sqlite3@4.0.0~preinstall: sqlite3@4.0.0
npm info lifecycle node-pre-gyp@0.9.0~preinstall: node-pre-gyp@0.9.0
npm info lifecycle nan@2.9.2~preinstall: nan@2.9.2
npm info lifecycle tar@4.4.0~preinstall: tar@4.4.0
npm info lifecycle minizlib@1.1.0~preinstall: minizlib@1.1.0
npm info lifecycle fs-minipass@1.2.5~preinstall: fs-minipass@1.2.5
npm info lifecycle minipass@2.2.1~preinstall: minipass@2.2.1
npm info lifecycle yallist@3.0.2~preinstall: yallist@3.0.2
npm info lifecycle rimraf@2.6.2~preinstall: rimraf@2.6.2
npm info lifecycle glob@7.1.2~preinstall: glob@7.1.2
npm info lifecycle inflight@1.0.6~preinstall: inflight@1.0.6
npm info lifecycle once@1.4.0~preinstall: once@1.4.0
npm info lifecycle wrappy@1.0.2~preinstall: wrappy@1.0.2
npm info lifecycle npmlog@4.1.2~preinstall: npmlog@4.1.2
npm info lifecycle gauge@2.7.4~preinstall: gauge@2.7.4
npm info lifecycle wide-align@1.1.2~preinstall: wide-align@1.1.2
npm info lifecycle are-we-there-yet@1.1.4~preinstall: are-we-there-yet@1.1.4
npm info linkStuff abbrev@1.1.1
npm info linkStuff ansi-regex@2.1.1
npm info linkStuff aproba@1.2.0
npm info linkStuff balanced-match@1.0.0
npm info linkStuff chownr@1.0.1
npm info linkStuff code-point-at@1.1.0
npm info linkStuff concat-map@0.0.1
npm info linkStuff brace-expansion@1.1.11
npm info linkStuff console-control-strings@1.1.0
npm info linkStuff core-util-is@1.0.2
npm info linkStuff deep-extend@0.4.2
npm info linkStuff delegates@1.0.0
npm info linkStuff detect-libc@1.0.3
npm info linkStuff fs.realpath@1.0.0
npm info linkStuff has-unicode@2.0.1
npm info linkStuff iconv-lite@0.4.19
npm info linkStuff inherits@2.0.3
npm info linkStuff ini@1.3.5
npm info linkStuff isarray@1.0.0
npm info linkStuff minimatch@3.0.4
npm info linkStuff ignore-walk@3.0.1
npm info linkStuff minimist@0.0.8
npm info linkStuff mkdirp@0.5.1
npm info linkStuff ms@2.0.0
npm info linkStuff debug@2.6.9
npm info linkStuff npm-bundled@1.0.3
npm info linkStuff npm-packlist@1.1.10
npm info linkStuff number-is-nan@1.0.1
npm info linkStuff is-fullwidth-code-point@1.0.0
npm info linkStuff object-assign@4.1.1
npm info linkStuff os-homedir@1.0.2
npm info linkStuff os-tmpdir@1.0.2
npm info linkStuff osenv@0.1.5
npm info linkStuff nopt@4.0.1
npm info linkStuff path-is-absolute@1.0.1
npm info linkStuff process-nextick-args@2.0.0
npm info linkStuff minimist@1.2.0
npm info linkStuff safe-buffer@5.1.1
npm info linkStuff sax@1.2.4
npm info linkStuff needle@2.2.0
npm info linkStuff semver@5.5.0
npm info linkStuff set-blocking@2.0.0
npm info linkStuff signal-exit@3.0.2
npm info linkStuff string_decoder@1.0.3
npm info linkStuff strip-ansi@3.0.1
npm info linkStuff string-width@1.0.2
npm info linkStuff strip-json-comments@2.0.1
npm info linkStuff rc@1.2.6
npm info linkStuff util-deprecate@1.0.2
npm info linkStuff readable-stream@2.3.5
npm info linkStuff are-we-there-yet@1.1.4
npm info linkStuff wide-align@1.1.2
npm info linkStuff gauge@2.7.4
npm info linkStuff npmlog@4.1.2
npm info linkStuff wrappy@1.0.2
npm info linkStuff once@1.4.0
npm info linkStuff inflight@1.0.6
npm info linkStuff glob@7.1.2
npm info linkStuff rimraf@2.6.2
npm info linkStuff yallist@3.0.2
npm info linkStuff minipass@2.2.1
npm info linkStuff fs-minipass@1.2.5
npm info linkStuff minizlib@1.1.0
npm info linkStuff tar@4.4.0
npm info linkStuff nan@2.9.2
npm info linkStuff node-pre-gyp@0.9.0
npm info linkStuff sqlite3@4.0.0
npm info lifecycle abbrev@1.1.1~install: abbrev@1.1.1
npm info lifecycle ansi-regex@2.1.1~install: ansi-regex@2.1.1
npm info lifecycle aproba@1.2.0~install: aproba@1.2.0
npm info lifecycle balanced-match@1.0.0~install: balanced-match@1.0.0
npm info lifecycle chownr@1.0.1~install: chownr@1.0.1
npm info lifecycle code-point-at@1.1.0~install: code-point-at@1.1.0
npm info lifecycle concat-map@0.0.1~install: concat-map@0.0.1
npm info lifecycle brace-expansion@1.1.11~install: brace-expansion@1.1.11
npm info lifecycle console-control-strings@1.1.0~install: console-control-strings@1.1.0
npm info lifecycle core-util-is@1.0.2~install: core-util-is@1.0.2
npm info lifecycle deep-extend@0.4.2~install: deep-extend@0.4.2
npm info lifecycle delegates@1.0.0~install: delegates@1.0.0
npm info lifecycle detect-libc@1.0.3~install: detect-libc@1.0.3
npm info lifecycle fs.realpath@1.0.0~install: fs.realpath@1.0.0
npm info lifecycle has-unicode@2.0.1~install: has-unicode@2.0.1
npm info lifecycle iconv-lite@0.4.19~install: iconv-lite@0.4.19
npm info lifecycle inherits@2.0.3~install: inherits@2.0.3
npm info lifecycle ini@1.3.5~install: ini@1.3.5
npm info lifecycle isarray@1.0.0~install: isarray@1.0.0
npm info lifecycle minimatch@3.0.4~install: minimatch@3.0.4
npm info lifecycle ignore-walk@3.0.1~install: ignore-walk@3.0.1
npm info lifecycle minimist@0.0.8~install: minimist@0.0.8
npm info lifecycle mkdirp@0.5.1~install: mkdirp@0.5.1
npm info lifecycle ms@2.0.0~install: ms@2.0.0
npm info lifecycle debug@2.6.9~install: debug@2.6.9
npm info lifecycle npm-bundled@1.0.3~install: npm-bundled@1.0.3
npm info lifecycle npm-packlist@1.1.10~install: npm-packlist@1.1.10
npm info lifecycle number-is-nan@1.0.1~install: number-is-nan@1.0.1
npm info lifecycle is-fullwidth-code-point@1.0.0~install: is-fullwidth-code-point@1.0.0
npm info lifecycle object-assign@4.1.1~install: object-assign@4.1.1
npm info lifecycle os-homedir@1.0.2~install: os-homedir@1.0.2
npm info lifecycle os-tmpdir@1.0.2~install: os-tmpdir@1.0.2
npm info lifecycle osenv@0.1.5~install: osenv@0.1.5
npm info lifecycle nopt@4.0.1~install: nopt@4.0.1
npm info lifecycle path-is-absolute@1.0.1~install: path-is-absolute@1.0.1
npm info lifecycle process-nextick-args@2.0.0~install: process-nextick-args@2.0.0
npm info lifecycle minimist@1.2.0~install: minimist@1.2.0
npm info lifecycle safe-buffer@5.1.1~install: safe-buffer@5.1.1
npm info lifecycle sax@1.2.4~install: sax@1.2.4
npm info lifecycle needle@2.2.0~install: needle@2.2.0
npm info lifecycle semver@5.5.0~install: semver@5.5.0
npm info lifecycle set-blocking@2.0.0~install: set-blocking@2.0.0
npm info lifecycle signal-exit@3.0.2~install: signal-exit@3.0.2
npm info lifecycle string_decoder@1.0.3~install: string_decoder@1.0.3
npm info lifecycle strip-ansi@3.0.1~install: strip-ansi@3.0.1
npm info lifecycle string-width@1.0.2~install: string-width@1.0.2
npm info lifecycle strip-json-comments@2.0.1~install: strip-json-comments@2.0.1
npm info lifecycle rc@1.2.6~install: rc@1.2.6
npm info lifecycle util-deprecate@1.0.2~install: util-deprecate@1.0.2
npm info lifecycle readable-stream@2.3.5~install: readable-stream@2.3.5
npm info lifecycle are-we-there-yet@1.1.4~install: are-we-there-yet@1.1.4
npm info lifecycle wide-align@1.1.2~install: wide-align@1.1.2
npm info lifecycle gauge@2.7.4~install: gauge@2.7.4
npm info lifecycle npmlog@4.1.2~install: npmlog@4.1.2
npm info lifecycle wrappy@1.0.2~install: wrappy@1.0.2
npm info lifecycle once@1.4.0~install: once@1.4.0
npm info lifecycle inflight@1.0.6~install: inflight@1.0.6
npm info lifecycle glob@7.1.2~install: glob@7.1.2
npm info lifecycle rimraf@2.6.2~install: rimraf@2.6.2
npm info lifecycle yallist@3.0.2~install: yallist@3.0.2
npm info lifecycle minipass@2.2.1~install: minipass@2.2.1
npm info lifecycle fs-minipass@1.2.5~install: fs-minipass@1.2.5
npm info lifecycle minizlib@1.1.0~install: minizlib@1.1.0
npm info lifecycle tar@4.4.0~install: tar@4.4.0
npm info lifecycle nan@2.9.2~install: nan@2.9.2
npm info lifecycle node-pre-gyp@0.9.0~install: node-pre-gyp@0.9.0
npm info lifecycle sqlite3@4.0.0~install: sqlite3@4.0.0

> sqlite3@4.0.0 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 node-pre-gyp@0.9.0
node-pre-gyp info using node@8.11.1 | 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 sqlite3@4.0.0~install: Failed to exec install script
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 6
npm ERR! sqlite3@4.0.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 6
npm ERR!
npm ERR! Failed at the sqlite3@4.0.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!     C:\Users\Dan\AppData\Roaming\npm-cache\_logs\2018-03-30T22_14_26_707Z-debug.log
@devuxer
Copy link
Author

devuxer commented Mar 30, 2018

I just tried uninstalling node 8.11.1 and installing 7.10.1, but this did not solve the problem (for either sqlite3@3.1.13 or 4.0.0).

@springmeyer
Copy link
Contributor

You are running npm@5.8.0. I recommend downgrading to npm@3 - see if that fixes it.

@devuxer
Copy link
Author

devuxer commented Mar 30, 2018

@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?

@devuxer
Copy link
Author

devuxer commented Mar 31, 2018

@springmeyer, I tried a few other combinations, but they also failed with the same errors:

  • Node 4.9.1 w/ npm 3.10.10
  • Node 5.12.0 w/ npm 3.10.10
  • Node 5.12.0 w/ npm 3.8.6

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.

@springmeyer
Copy link
Contributor

@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:

@devuxer
Copy link
Author

devuxer commented Mar 31, 2018

@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 npm@5.6.0, 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:

  1. I'm in a different location, so the ISP and network are different. Perhaps something about the way the office network is configured was causing the problem.
  2. My machine just needed to be restarted, though I restarted multiple times during all my testing earlier in the day, so I kind of doubt this was the problem.
  3. Something wasn't quite right with the hosted binaries on appveyor, but they've since been fixed.

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!

@devuxer devuxer closed this as completed Mar 31, 2018
@devuxer
Copy link
Author

devuxer commented Apr 6, 2018

@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!

@Anthony-Mckale
Copy link

Anthony-Mckale commented Jun 5, 2018

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/"

@altamash-ak
Copy link

https://nodejs.org/dist/v10.2.0/
node-v10.2.0-x64.msi

try download that, it worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants