4

I'm running Ubuntu 17.04

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/npm/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/npm/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.<anonymous> (/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/npm/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-11T04_34_39_178Z-debug.log

Now firebase-tools doesn't work at all. I wish I stayed with v3.9.0.

Filed an issue: https://github.com/MayhemYDG/iltorb/issues/46

What can I do?

Csaba Toth
  • 10,021
  • 5
  • 75
  • 121

1 Answers1

5

I had the same problem today, after reading many things and trying many things (e.g. sudo npm install -g gyp-node) nothing worked, untill I stumbled on NPM's unsafe-perm flag:

--unsafe-perm

WARNING: Use with care and read the documentation first

But it fixed my problem and hopefully yours too.

Ben
  • 563
  • 3
  • 8
  • 1
    Another path to consider is https://docs.npmjs.com/getting-started/fixing-npm-permissions as advised by @MayhemYDG in https://github.com/MayhemYDG/iltorb/issues/46 – Csaba Toth Aug 11 '17 at 15:49
  • Thanks, will need to check that! – Ben Aug 11 '17 at 15:50