Skip to content
This repository has been archived by the owner. It is now read-only.

Installing still makes npm disappear #5984

Closed
faiq opened this Issue Aug 19, 2014 · 4 comments

Comments

Projects
None yet
4 participants
@faiq
Copy link
Contributor

faiq commented Aug 19, 2014

Hey I tried updating npm but I forgot to add the sudo before it, and for some reason it doesn't find my npm anymore. This is the commands and output I got

07:04 PM  Faiq @ Faiqs-MacBook-Air  ~
$ npm i -g npm
npm http GET https://registry.npmjs.org/npm
npm http 200 https://registry.npmjs.org/npm
npm http GET https://registry.npmjs.org/npm/-/npm-1.4.23.tgz
npm http 200 https://registry.npmjs.org/npm/-/npm-1.4.23.tgz
npm ERR! error rolling back Error: EACCES, unlink '/usr/local/lib/node_modules/npm'
npm ERR! error rolling back  npm@1.4.23 { [Error: EACCES, unlink '/usr/local/lib/node_modules/npm']
npm ERR! error rolling back   errno: 3,
npm ERR! error rolling back   code: 'EACCES',
npm ERR! error rolling back   path: '/usr/local/lib/node_modules/npm' }
npm ERR! Error: EACCES, unlink '/usr/local/lib/node_modules/npm'
npm ERR!  { [Error: EACCES, unlink '/usr/local/lib/node_modules/npm']
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/usr/local/lib/node_modules/npm' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "i" "-g" "npm"
npm ERR! cwd /Users/Faiq
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.20
npm ERR! path /usr/local/lib/node_modules/npm
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, unlink '/usr/local/lib/node_modules/npm'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/Faiq/npm-debug.log
npm ERR! not ok code 0

07:05 PM  Faiq @ Faiqs-MacBook-Air  ~  ⏎ 3
$ sudo npm i -g npm
sudo: npm: command not found

cc: @othiym23

@zeke

This comment has been minimized.

Copy link
Contributor

zeke commented Aug 29, 2014

Me too

@othiym23 othiym23 added this to the multi-stage install milestone Aug 29, 2014

@othiym23 othiym23 added bug labels Aug 29, 2014

@othiym23

This comment has been minimized.

Copy link
Contributor

othiym23 commented Aug 29, 2014

We can't fix this until we have a more transaction install process, which will be coming with multi-stage install.

(This is also probably a dupe of many other issues.)

@faiq

This comment has been minimized.

Copy link
Contributor Author

faiq commented Aug 30, 2014

So the reason I made it its own issue was because I didn't use sudo to install it. If its a dupe, we can go ahead and close it :)

@iarna

This comment has been minimized.

Copy link
Member

iarna commented Dec 15, 2014

This should be largely fixed by just putting off rm commands as long as possible. But even if that doesn't do it, this should be prevented by #6942. As such, I'm closing this and further discussion can happen over there.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.