hokaccha / nodebrew

Node.js version manager
MIT License
1.06k stars 66 forks source link

Can't install or remove global packages with npm@2.1.9 #29

Closed teppeis closed 9 years ago

teppeis commented 9 years ago

npm@2.1.8 OK npm@2.1.9 Error (checked on mac and ubuntu)

$ npm i -g npm
$ npm -v
2.1.9
$ npm i -g gulp
npm ERR! Linux 3.13.0-39-generic
npm ERR! argv "node" "/home/vagrant/.nodebrew/current/bin/npm" "i" "-g" "bower"
npm ERR! node v0.10.33
npm ERR! npm  v2.1.9
npm ERR! path /home/vagrant/.nodebrew/current/bin/bower
npm ERR! code EEXIST

npm ERR! Refusing to delete: /home/vagrant/.nodebrew/current/bin/bower not in /home/vagrant/.nodebrew/current
File exists: /home/vagrant/.nodebrew/current/bin/bower
Move it away, and try again. 
npm ERR! error rolling back Error: Refusing to delete: /home/vagrant/.nodebrew/current/bin/bower not in /home/vagrant/.nodebrew/current
npm ERR! error rolling back     at clobberFail (/home/vagrant/.nodebrew/node/v0.10.33/lib/node_modules/npm/lib/utils/gently-rm.js:166:12)
npm ERR! error rolling back     at /home/vagrant/.nodebrew/node/v0.10.33/lib/node_modules/npm/lib/utils/gently-rm.js:56:14
npm ERR! error rolling back     at /home/vagrant/.nodebrew/node/v0.10.33/lib/node_modules/npm/node_modules/dezalgo/dezalgo.js:17:12
npm ERR! error rolling back     at flush (/home/vagrant/.nodebrew/node/v0.10.33/lib/node_modules/npm/node_modules/dezalgo/node_modules/asap/asap.js:27:13)
npm ERR! error rolling back     at process._tickCallback (node.js:419:13)
npm ERR! error rolling back  { [Error: Refusing to delete: /home/vagrant/.nodebrew/current/bin/bower not in /home/vagrant/.nodebrew/current]
npm ERR! error rolling back   code: 'EEXIST',
npm ERR! error rolling back   path: '/home/vagrant/.nodebrew/current/bin/bower' }

npm ERR! Please include the following file with any support request:
npm ERR!     /home/vagrant/npm-debug.log

npm v2.1.9 release note is here. https://github.com/npm/npm/issues/5754 (https://github.com/npm/npm/pull/6685) may cause this issue?

hokaccha commented 9 years ago

I reported to npm. https://github.com/npm/npm/issues/6774

hokaccha commented 9 years ago

Temporary solution:

$ cd ~/.nodebrew/current/lib
$ npm install npm@2.1.8
hokaccha commented 9 years ago

Fixed by npm@v2.1.11