NPM self-destructed on error #1995

gsmcwhirter opened this Issue Jan 5, 2012 · 3 comments


None yet
4 participants

I attempted a "npm update -g" today not remembering that one module had a permissions error. NPM@1.0.106 on node v0.6.5 correctly errored out with the log "1" at

When I went to do a "sudo npm update -g" afterwards (and anything involving npm now), I get the error at log "2" at the same gist url.

Reinstalled NPM (version 1.1.0-beta-10) and did the same thing. Got a similar error (with more noise) the first time, and then npm seems to have deleted its executable ("bash: /usr/local/bin/npm: No such file or directory") instead of giving the missing module error.

My next attempt, I manually removed the offending package, reinstalled NPM again (using "curl | sh"), and did "npm update -g", which failed with error "3" at the same gist url, and npm again deleted its executable.

I can confirm the same kind of problem.

Npm originally installed using the Mac OSX installer package from, issuing "npm update -g" kills npm itself.

Same here.


luk- commented Mar 13, 2013

Set up permissions so you don't need sudo for anything npm and it should solve this.

@luk- luk- closed this Mar 13, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment