Skip to content

Error trying to update npm #4046

Closed
kbanman opened this Issue Oct 26, 2013 · 8 comments

6 participants

@kbanman
kbanman commented Oct 26, 2013
npm ERR! Error: ENOENT, chmod '/usr/local/lib/node_modules/npm/node_modules/ansi/examples/imgcat/index.js'
npm ERR! System Darwin 13.0.0
npm ERR! command "node" "/usr/local/bin/npm" "-g" "update"
npm ERR! cwd /www
npm ERR! node -v v0.10.20
npm ERR! npm -v 1.3.11
npm ERR! path /usr/local/lib/node_modules/npm/node_modules/ansi/examples/imgcat/index.js
npm ERR! code ENOENT
npm ERR! errno 34

This resulted in the npm cli being missing..

@kbanman
kbanman commented Oct 26, 2013

Here is a potentially relevant snippet from npm-debug.log:

53992 verbose linkBins ansi@0.1.2
53993 verbose link bins [ { beep: './examples/beep/index.js',
53993 verbose link bins     clear: './examples/clear/index.js',
53993 verbose link bins     imgcat: './examples/imgcat/index.js',
53993 verbose link bins     starwars: './examples/starwars.js' },
53993 verbose link bins   '/usr/local/lib/node_modules/npm/node_modules/.bin',
53993 verbose link bins   false ]
53994 verbose linkMans ansi@0.1.2
@boazrymland

:-/ Got it as well. Mine is Linux but the same problem, almost the same versions reported:

npm ERR! System Linux 3.5.0-42-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "update"
npm ERR! cwd /usr/lib/node_modules
npm ERR! node -v v0.10.21
npm ERR! npm -v 1.3.11
npm ERR! path /usr/lib/node_modules/npm/node_modules/ansi/examples/imgcat/index.js
npm ERR! code ENOENT
npm ERR! errno 34

@leesei
leesei commented Nov 29, 2013

From the log I see it tries to uninstall npm@1.3.15 while I have npm@1.3.11 installed.
Is this a bug?

36036 info /home/leesei/.nvm/v0.10.20/lib/node_modules/npm unbuild
36037 info preuninstall npm@1.3.15
36038 info uninstall npm@1.3.15
36039 verbose true,/home/leesei/.nvm/v0.10.20/lib/node_modules,/home/leesei/.nvm/v0.10.20/lib/node_modules unbuild npm@1.3.15
36040 verbose /home/leesei/.nvm/v0.10.20/bin,[object Object] binRoot
36041 info postuninstall npm@1.3.15
36042 error Error: ENOENT, chmod '/home/leesei/.nvm/v0.10.20/lib/node_modules/npm/node_modules/ansi/examples/imgcat/index.js'
36043 error If you need help, you may report this log at:
36043 error     <http://github.com/isaacs/npm/issues>
36043 error or email it to:
36043 error     <npm-@googlegroups.com>
36044 error System Linux 3.10-2-amd64
36045 error command "/home/leesei/.nvm/v0.10.20/bin/node" "/home/leesei/.nvm/v0.10.20/bin/npm" "update" "-g"
36046 error cwd /home/leesei
36047 error node -v v0.10.20
36048 error npm -v 1.3.11
36049 error path /home/leesei/.nvm/v0.10.20/lib/node_modules/npm/node_modules/ansi/examples/imgcat/index.js
36050 error code ENOENT
36051 error errno 34
36052 verbose exit [ 34, true ]

Anyway, ansi@0.2.0 removed imgcat dependency.
npm@1.3.11 depends on ansi@0.1.2.
I'm not sure which postuninstall is being executed on what version of ansi, the issue may stem from there.

@materliu

the same issue here!

@bradrich

This has burned me up all day! I haven't been able to get NPM to get through a single request.

@bradrich

node -v v0.10.24
npm -v 1.3.21

@leesei
leesei commented Dec 20, 2013

FYI, I work-around this by installing NPM manually afterwards:
curl https://npmjs.org/install.sh | sh

@timoxley
npm member
timoxley commented Jan 8, 2014

Looks like a duplicate of #4099. @kbanman can we please close this in favour of the other issue?

#4430

@kbanman kbanman closed this Jan 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.