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

npm issue with node v4.8.5 #16528

Closed
anandsuresh opened this issue Oct 26, 2017 · 12 comments
Closed

npm issue with node v4.8.5 #16528

anandsuresh opened this issue Oct 26, 2017 · 12 comments
Labels
npm Issues and PRs related to the npm client dependency or the npm registry. smartos Issues and PRs related to the SmartOS platform.

Comments

@anandsuresh
Copy link
Contributor

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

@mscdex mscdex added the npm Issues and PRs related to the npm client dependency or the npm registry. label Oct 27, 2017
@bnoordhuis bnoordhuis added the smartos Issues and PRs related to the SmartOS platform. label Oct 27, 2017
@bnoordhuis
Copy link
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).

@cjihrig
Copy link
Contributor

cjihrig commented Oct 27, 2017

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

@anandsuresh
Copy link
Contributor Author

anandsuresh commented Oct 27, 2017 via email

@cjihrig
Copy link
Contributor

cjihrig commented Oct 27, 2017

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

@anandsuresh
Copy link
Contributor Author

anandsuresh commented Oct 30, 2017

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.

@MylesBorins
Copy link
Member

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

@misterdjules
Copy link

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

@anandsuresh
Copy link
Contributor Author

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

@anandsuresh
Copy link
Contributor Author

@misterdjules Seems like an ABI compatibility issue.

@misterdjules
Copy link

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

@anandsuresh
Copy link
Contributor Author

anandsuresh commented Nov 16, 2017 via email

@misterdjules
Copy link

@anandsuresh Excellent thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
npm Issues and PRs related to the npm client dependency or the npm registry. smartos Issues and PRs related to the SmartOS platform.
Projects
None yet
Development

No branches or pull requests

6 participants