Skip to content

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

Closed

Description

@n-riesco

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?

Activity

  1. n-riesco commented on Nov 17, 2017

    @n-riesco
    OwnerAuthor

    @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

  2. 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)[/+] on Nov 17, 2017
  3. n-riesco commented on Nov 19, 2017

    @n-riesco
    OwnerAuthor

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

  4. 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)[/+] on Nov 20, 2017
  5. n-riesco commented on Nov 20, 2017

    @n-riesco
    OwnerAuthor

    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
    
  6. n-riesco commented on Nov 20, 2017

    @n-riesco
    OwnerAuthor

    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
    
  7. 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)[/+] on Nov 20, 2017
  8. freiit commented on Jun 19, 2018

    @freiit

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

    npm --unsafe-perm install -g ijavascript
    
  9. n-riesco commented on Jun 19, 2018

    @n-riesco
    OwnerAuthor

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

  10. Masterxilo commented on Dec 11, 2018

    @Masterxilo

    I have the same problem.

  11. n-riesco commented on Dec 11, 2018

    @n-riesco
    OwnerAuthor

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

  12. michael-ziedalski commented on Jun 30, 2019

    @michael-ziedalski

    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?

  13. n-riesco commented on Jul 1, 2019

    @n-riesco
    OwnerAuthor

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions