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 upgrade destroyed npm #1344

Closed
tad opened this issue Jul 31, 2015 · 5 comments
Closed

npm upgrade destroyed npm #1344

tad opened this issue Jul 31, 2015 · 5 comments

Comments

@tad
Copy link

tad commented Jul 31, 2015

I just tried to upgrade to the latest npm by doing:

npm install npm -g

And that threw a bunch of errors, and now npm is busted.

Do I need to reinstall node?

@tad tad changed the title npm upgrade destoryed npm npm upgrade destroyed npm Jul 31, 2015
@tad
Copy link
Author

tad commented Jul 31, 2015

I have since closed that terminal window (dumb, I know) so I can't share the errors that were thrown.

They all mostly looked like access/permissions errors.

I haven't had any problems with npm in the past.

@tad
Copy link
Author

tad commented Jul 31, 2015

I found this:

workshopper/how-to-npm#27

Apparently that one npm install requires to be run via sudo. I've installed tons of other npm modules globally without sudo, but I guess from now on I'll always use sudo.

@tad
Copy link
Author

tad commented Jul 31, 2015

I did reinstall node and then I was able to successfully upgrade npm by using sudo.

@tad tad closed this as completed Jul 31, 2015
@stonemirror
Copy link

On Jul 31, 2015, at 11:13 AM, Tad Donaghe [email protected] wrote:

I found this:

workshopper/how-to-npm#27

Apparently that one npm install requires to be run via sudo. I've installed tons of other npm modules globally without sudo, but I guess from now on I'll always use sudo.

In my experience, any global (i.e. "-g") install needs escalated privileges.

@SomeoneWeird
Copy link
Member

You should never upgrade npm by running npm upgrade npm, you should always do npm install npm@latest -g

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants