Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

NPM self-destructed on error #1995

Closed
gsmcwhirter opened this issue Jan 5, 2012 · 3 comments
Closed

NPM self-destructed on error #1995

gsmcwhirter opened this issue Jan 5, 2012 · 3 comments

Comments

@gsmcwhirter
Copy link

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 https://gist.github.com/1567273

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 http://npmjs.org/install.sh | sh"), and did "npm update -g", which failed with error "3" at the same gist url, and npm again deleted its executable.

@pete-otaqui
Copy link

I can confirm the same kind of problem.

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

@eric-john-miller
Copy link

Same here.

@luk-
Copy link
Contributor

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 as completed Mar 13, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants