Skip to content

npm issue with node v4.8.5 #16528

Description

@anandsuresh
  • v4.8.5
  • SunOS hostname 5.11 joyent_20141030T081701Z i86pc i386 i86pc Solaris
  • npm:

Attempting to upgrade npm after installing v4.8.5 (with npm v2.15.11) always fails with the following error:

$ node -v
v4.8.5
$ npm -v
2.15.11
$ sudo npm install -g npm@3.3.10
npm ERR! tar.unpack untar error /home/anand/.npm/npm/3.3.10/package.tgz
npm ERR! SunOS 5.11
npm ERR! argv "/opt/local/bin/node" "/opt/local/bin/npm" "install" "-g" "npm@3.3.10"
npm ERR! node v4.8.5
npm ERR! npm  v2.15.11
npm ERR! code EINVAL
npm ERR! errno -22
npm ERR! syscall write

npm ERR! EINVAL: invalid argument, write
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>
npm ERR! tar.unpack untar error /home/anand/.npm/npm/3.3.10/package.tgz
npm ERR! error rolling back Error: EEXIST: file already exists, rmdir '/opt/local/lib/node_modules/npm'
npm ERR! error rolling back     at Error (native)
npm ERR! error rolling back  { [Error: EEXIST: file already exists, rmdir '/opt/local/lib/node_modules/npm']
npm ERR! error rolling back   errno: -17,
npm ERR! error rolling back   code: 'EEXIST',
npm ERR! error rolling back   syscall: 'rmdir',
npm ERR! error rolling back   path: '/opt/local/lib/node_modules/npm' }
npm ERR! tar.unpack untar error /home/anand/.npm/npm/3.3.10/package.tgz

npm ERR! Please include the following file with any support request:
npm ERR!     /opt/local/lib/npm-debug.log

Attempting the same with node v4.8.4 produces expected results.

Activity

  1. added
    npmIssues and PRs related to the npm client dependency or the npm registry.
    on Oct 27, 2017
  2. added
    smartosIssues and PRs related to the SmartOS platform.
    on Oct 27, 2017
  3. bnoordhuis commented on Oct 27, 2017

    @bnoordhuis
    Member

    @nodejs/platform-smartos Seems to be a solaris/smartos issue. The diff between v4.8.4 and v4.8.5 is just one commit (f5defa2).

  4. cjihrig commented on Oct 27, 2017

    @cjihrig
    Contributor

    I can't reproduce, at least using nvm:

    # node -v
    v4.8.5
    # npm -v
    2.15.11
    # npm i -g npm@3.3.10
    /cjihrig/.nvm/versions/node/v4.8.5/bin/npm -> /cjihrig/.nvm/versions/node/v4.8.5/lib/node_modules/npm/bin/npm-cli.js
    npm@3.3.10 /cjihrig/.nvm/versions/node/v4.8.5/lib/node_modules/npm
    # node -v
    v4.8.5
    # npm -v
    3.3.10
    
  5. anandsuresh commented on Oct 27, 2017

    @anandsuresh
    ContributorAuthor
  6. cjihrig commented on Oct 27, 2017

    @cjihrig
    Contributor

    @anandsuresh a couple questions:

    1. Can you try on a more recent version than 20141030T081701Z?
    2. Where are you getting the Node binaries from? Are they the official ones?
  7. anandsuresh commented on Oct 30, 2017

    @anandsuresh
    ContributorAuthor

    Sorry the late reply.

    1. Works fine on SunOS jpc1-anand-01.voxer.com 5.11 joyent_20170202T033902Z i86pc i386 i86pc Solaris
    2. I got the source code from https://nodejs.org/dist/v4.8.5/node-v4.8.5.tar.gz and built it.
  8. MylesBorins commented on Nov 2, 2017

    @MylesBorins
    Contributor

    I don't know if you found a resolution on this, but the Npm error seems like this may be a file permission thing

  9. misterdjules commented on Nov 2, 2017

    @misterdjules

    @MylesBorins The problem was probably that the node binary that was used was built on a version of SmartOS that was more recent (and not ABI compatible) with the version of SmartOS on which npm was running when the problem occurred.

    @anandsuresh Can you confirm that?

  10. anandsuresh commented on Nov 3, 2017

    @anandsuresh
    ContributorAuthor

    @misterdjules I have a feeling that that might be the root cause. I'm rebuilding the binary on a different server to see if that helps the issue. Will keep you posted.

  11. anandsuresh commented on Nov 3, 2017

    @anandsuresh
    ContributorAuthor

    @misterdjules Seems like an ABI compatibility issue.

  12. misterdjules commented on Nov 16, 2017

    @misterdjules

    @anandsuresh

    Seems like an ABI compatibility issue.

    Just to make sure I'm understanding this correctly: did you confirm that rebuilding the binary on a server that has an OS version <= to the OS version of the server that runs the binary fixes the problem?

  13. anandsuresh commented on Nov 16, 2017

    @anandsuresh
    ContributorAuthor
  14. misterdjules commented on Nov 16, 2017

    @misterdjules

    @anandsuresh Excellent thanks!

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

    npmIssues and PRs related to the npm client dependency or the npm registry.smartosIssues and PRs related to the SmartOS platform.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions