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

Failure to install using node@9.2.0 and npm@5.5.1 (zeromq dependency fails to install) #124

Closed
n-riesco opened this issue Nov 17, 2017 · 10 comments
Labels

Comments

@n-riesco
Copy link
Owner

Moved from #123 (comment)


I'm on macHighSierra 10.13.1

I have nodejs and npm installed:

christophers-MacBook-Pro:~ christophervillanueva$ node --version
v9.2.0
christophers-MacBook-Pro:~ christophervillanueva$ npm --version
5.5.1

All installation steps in the README work until the last command;
christophers-MacBook-Pro:~ christophervillanueva$ sudo npm install -g ijavascript
Password:
/usr/local/bin/ijs -> /usr/local/lib/node_modules/ijavascript/bin/ijavascript.js
/usr/local/bin/ijsconsole -> /usr/local/lib/node_modules/ijavascript/bin/ijsconsole.js
/usr/local/bin/ijsinstall -> /usr/local/lib/node_modules/ijavascript/bin/ijsinstall.js
/usr/local/bin/ijskernel -> /usr/local/lib/node_modules/ijavascript/lib/kernel.js
/usr/local/bin/ijsnotebook -> /usr/local/lib/node_modules/ijavascript/bin/ijsnotebook.js

zeromq@4.6.0 install /usr/local/lib/node_modules/ijavascript/node_modules/zeromq
node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)

prebuild-install info begin Prebuild-install version 2.3.0
prebuild-install info looking for local prebuild @ prebuilds/zeromq-v4.6.0-node-v59-darwin-x64.tar.gz
prebuild-install WARN install EACCES: permission denied, access '/Users/christophervillanueva/.npm'

fs.js:905
return binding.mkdir(pathModule.toNamespacedPath(path),
^

Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/ijavascript/node_modules/zeromq/zmq'
at Object.fs.mkdirSync (fs.js:905:18)
at Object. (/usr/local/lib/node_modules/ijavascript/node_modules/zeromq/scripts/preinstall.js:89:8)
at Module._compile (module.js:641:30)
at Object.Module._extensions..js (module.js:652:10)
at Module.load (module.js:560:32)
at tryModuleLoad (module.js:503:12)
at Function.Module._load (module.js:495:3)
at Function.Module.runMain (module.js:682:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:613:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zeromq@4.6.0 install: node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zeromq@4.6.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! /Users/christophervillanueva/.npm/_logs/2017-11-17T02_08_30_334Z-debug.log

Any suggestions?

@n-riesco
Copy link
Owner Author

n-riesco commented Nov 17, 2017

@chrisVillanueva As a workaround for the time being, I'd suggest to use a local install. See instructions here: http://n-riesco.github.io/ijavascript/doc/install.md.html

@n-riesco n-riesco changed the title Failure to install in Mac (zeromq dependency fails to install) Failure to install using sudo on Mac (zeromq dependency fails to install) Nov 17, 2017
@n-riesco
Copy link
Owner Author

n-riesco commented Nov 19, 2017

@chrisVillanueva I can't find node@9.2.0 on brew. How did you install node and npm?

npm@5.5.1 is compatible with node@9 (see nodejs/node#16649 and npm/npm#19019 ).

From nodejs/node#16509 I understand that node@9.2.0 comes with a patched version of npm@5.5.1 to fix this incompatibility.

@n-riesco n-riesco changed the title Failure to install using sudo on Mac (zeromq dependency fails to install) Failure to install using node@9.20 and npm@5.5.1 (zeromq dependency fails to install) Nov 20, 2017
@n-riesco
Copy link
Owner Author

I've got to reproduce this issue using docker and node:latest:

$ docker pull node:latest
[...]

$ docker run -ti node:latest /bin/bash
root@0fe57d81177d:/# npm --versions
{ npm: '5.5.1',
  ares: '1.13.0',
  cldr: '32.0',
  http_parser: '2.7.0',
  icu: '60.1',
  modules: '59',
  nghttp2: '1.25.0',
  node: '9.2.0',
  openssl: '1.0.2m',
  tz: '2017c',
  unicode: '10.0',
  uv: '1.16.1',
  v8: '6.2.414.44-node.11',
  zlib: '1.2.11' }

root@0fe57d81177d:/# apt-get update && apt-get install ipython ipython-notebook
[...]

root@0fe57d81177d:/# npm install -g ijavascript
/usr/local/bin/ijs -> /usr/local/lib/node_modules/ijavascript/bin/ijavascript.js
/usr/local/bin/ijsinstall -> /usr/local/lib/node_modules/ijavascript/bin/ijsinstall.js
/usr/local/bin/ijsnotebook -> /usr/local/lib/node_modules/ijavascript/bin/ijsnotebook.js
/usr/local/bin/ijskernel -> /usr/local/lib/node_modules/ijavascript/lib/kernel.js
/usr/local/bin/ijsconsole -> /usr/local/lib/node_modules/ijavascript/bin/ijsconsole.js

> zeromq@4.6.0 install /usr/local/lib/node_modules/ijavascript/node_modules/zeromq
> node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)


prebuild-install info begin Prebuild-install version 2.3.0
prebuild-install info looking for local prebuild @ prebuilds/zeromq-v4.6.0-node-v59-linux-x64.tar.gz
prebuild-install WARN install EACCES: permission denied, access '/root/.npm'

fs.js:905
  return binding.mkdir(pathModule.toNamespacedPath(path),
                 ^

Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/ijavascript/node_modules/zeromq/zmq'
    at Object.fs.mkdirSync (fs.js:905:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/ijavascript/node_modules/zeromq/scripts/preinstall.js:89:8)
    at Module._compile (module.js:641:30)
    at Object.Module._extensions..js (module.js:652:10)
    at Module.load (module.js:560:32)
    at tryModuleLoad (module.js:503:12)
    at Function.Module._load (module.js:495:3)
    at Function.Module.runMain (module.js:682:10)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:613:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zeromq@4.6.0 install: `node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the zeromq@4.6.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!     /root/.npm/_logs/2017-11-20T08_20_08_432Z-debug.log

@n-riesco
Copy link
Owner Author

Again, for the time being, until node@9 and npm@5.5 fix their incompatibilities, I recommend to install IJavascript locally:

$ npm config set prefix ~

$ npm install -g ijavascript
[...]

$ export PATH=$PATH:$HOME/bin

$ ijs --versions
ijavascript 5.0.20
jmp 1.0.0
jp-kernel 0.1.5
nel 0.5.7
uuid 3.1.0
zeromq 4.6.0

@n-riesco n-riesco changed the title Failure to install using node@9.20 and npm@5.5.1 (zeromq dependency fails to install) Failure to install using node@9.2.0 and npm@5.5.1 (zeromq dependency fails to install) Nov 20, 2017
@freiit
Copy link

freiit commented Jun 19, 2018

I had the same issue with node 10.4.1 and newest npm. Fixed by

npm --unsafe-perm install -g ijavascript

@n-riesco
Copy link
Owner Author

@freiit --usafe-perm is only needed for installations by the root user. Pleae, see #146 .

@Masterxilo
Copy link

I have the same problem.

@n-riesco
Copy link
Owner Author

@Masterxilo , just to confirm the issue you're seeing is #179?

@michael-ziedalski
Copy link

michael-ziedalski commented Jun 30, 2019

I have the same exact issue, have a fully updated node + npm, and freit's solution did not seem to work. Is there something else that can be tried to solve this serious bug?

@n-riesco
Copy link
Owner Author

n-riesco commented Jul 1, 2019

@michael-ziedalski Please, have a look at the requirements listed in #184.

If the info in #184 doesn't help, please, open a new issue and post what commands you are running and their output.

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

No branches or pull requests

4 participants