question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

install failed with node 10

See original GitHub issue

Trying to install on the latest Node 10:

drom@localhost:~/work/lab/ecp5> nvm i 10
v10.4.0 is already installed.
Now using node v10.4.0 (npm v6.1.0)
drom@localhost:~/work/lab/ecp5> npm i

> usb@1.3.1 install /home/drom/work/lab/ecp5/node_modules/usb
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(404): https://github.com/tessel/node-usb/releases/download/1.3.1/usb_bindings-v1.3.1-node-v64-linux-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for usb@1.3.1 and node@10.4.0 (node-v64 ABI, glibc) (falling back to source compile with node-gyp) 
node-pre-gyp ERR! Tried to download(undefined): https://github.com/tessel/node-usb/releases/download/1.3.1/usb_bindings-v1.3.1-node-v64-linux-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for usb@1.3.1 and node@10.4.0 (node-v64 ABI, glibc) (falling back to source compile with node-gyp) 
make: Entering directory '/home/drom/work/lab/ecp5/node_modules/usb/build'
make: *** No targets.  Stop.
make: Leaving directory '/home/drom/work/lab/ecp5/node_modules/usb/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/drom/.nvm/versions/node/v10.4.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 4.16.12-2-default
gyp ERR! command "/home/drom/.nvm/versions/node/v10.4.0/bin/node" "/home/drom/.nvm/versions/node/v10.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/drom/work/lab/ecp5/node_modules/usb/src/binding/usb_bindings.node" "--module_name=usb_bindings" "--module_path=/home/drom/work/lab/ecp5/node_modules/usb/src/binding"
gyp ERR! cwd /home/drom/work/lab/ecp5/node_modules/usb
gyp ERR! node -v v10.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/home/drom/.nvm/versions/node/v10.4.0/bin/node /home/drom/.nvm/versions/node/v10.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/drom/work/lab/ecp5/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/home/drom/work/lab/ecp5/node_modules/usb/src/binding' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/drom/work/lab/ecp5/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
node-pre-gyp ERR! System Linux 4.16.12-2-default
node-pre-gyp ERR! command "/home/drom/.nvm/versions/node/v10.4.0/bin/node" "/home/drom/work/lab/ecp5/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/drom/work/lab/ecp5/node_modules/usb
node-pre-gyp ERR! node -v v10.4.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok 
Failed to execute '/home/drom/.nvm/versions/node/v10.4.0/bin/node /home/drom/.nvm/versions/node/v10.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/drom/work/lab/ecp5/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/home/drom/work/lab/ecp5/node_modules/usb/src/binding' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! usb@1.3.1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the usb@1.3.1 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!     /home/drom/.npm/_logs/2018-06-09T20_03_21_997Z-debug.log

2018-06-09T20_03_21_997Z-debug.log

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kevinmehallcommented, Jul 10, 2018

As a workaround, npm install --build-from-source=usb might skip the network request whose error handling causes that issue.

1reaction
kevinmehallcommented, Jun 11, 2018

Released 1.3.2 with the node-pre-gyp upgrade as well as binary builds for Node 10 on Windows and macOS. Tested on Linux and confirmed that the node-pre-gyp upgrade solves the double-build issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node failed to install · Issue #2122 · nodejs/help
So, i just downloaded the lastet version of node v12.8.1 and tried installing it on my windows 10 after deleting the node version...
Read more >
Node 10 - `node-gyp rebuild` error during npm install
Resolved the issue by updating npm to latest version & running npm rebuild.
Read more >
Npm install command failing with message "could not find ...
When I run the npm install command, npm starts downloading the dependencies. But then, suddenly, it stops with the error:
Read more >
NPM install error
Trying to install MDB pro 4.19.2 just downloaded and ran npm install but getting this error of sha512 not matching. Can someone tell...
Read more >
node-sass
Keywords · Install · Repository · Homepage · Weekly Downloads · Version · License · Unpacked Size · Total Files.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found