node-gyp fails on Ubuntu 17.04
Closed this issue · 7 comments
- node version: 8.0.0
- npm version: 5.3.0
- node-gyp version: 3.6.2
`
csaba@titan:~/GitRepos/valleydevfest2017$ sudo npm install -g iltorb
iltorb@1.3.5 install /usr/local/lib/node_modules/iltorb
node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(undefined): https://github.com/MayhemYDG/iltorb/releases/download/1.3.5/node-v57-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for iltorb@1.3.5 and node@8.0.0 (node-v57 ABI) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/iltorb/build'
gyp ERR! System Linux 4.10.0-28-lowlatency
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/lib/node_modules/iltorb/build/bindings/iltorb.node" "--module_name=iltorb" "--module_path=/usr/local/lib/node_modules/iltorb/build/bindings"
gyp ERR! cwd /usr/local/lib/node_modules/iltorb
gyp ERR! node -v v8.0.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 '/usr/local/bin/node /usr/local/lib/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/iltorb/build/bindings/iltorb.node --module_name=iltorb --module_path=/usr/local/lib/node_modules/iltorb/build/bindings' (1)
node-pre-gyp ERR! stack at ChildProcess. (/usr/local/lib/node_modules/iltorb/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:125:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:213:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:887:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
node-pre-gyp ERR! System Linux 4.10.0-28-lowlatency
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/iltorb/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/iltorb
node-pre-gyp ERR! node -v v8.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.36
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/iltorb/build/bindings/iltorb.node --module_name=iltorb --module_path=/usr/local/lib/node_modules/iltorb/build/bindings' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! iltorb@1.3.5 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the iltorb@1.3.5 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/csaba/.npm/_logs/2017-08-11T05_27_44_843Z-debug.log
`
Problem is that firebase-tools
depends on this and now I don't have any firebase commands.
https://stackoverflow.com/questions/45627108/cannot-upgrade-firebase-tools-because-dependency-iltorb-npm-package-fails-to-ins
One solution would be to upgrade your Node.js to version 6 or 8. Or downgrade to 4.
We don't offer pre-built binaries for version 5 since it's not maintained anymore and you should really switch.
Otherwise, in order to build the binaries you'll need to have the required tools as detailed in the readme.
@MayhemYDG Sorry for the confusion but my node version is 8.0.0 and the npm version is 5.x. I listed the npm version first, I changed the order so the node comes first. On SO it looks like two other persons have the same problem.
Oops, looking more closely at your error log we see this:
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/iltorb/build'
If you were trying to install iltorb globally you'll probably need sudo/root permission.
@MayhemYDG Yes, I issued the npm install with sudo. I know, it's weird why I get permission error.
Gonna close this out since it seems to have been resolved on the SO link.