I had an old installation of express (3.4.8), when I tried sudo npm install -g express-generator, I got this:
npm http GET https://registry.npmjs.org/express-generator
npm http 304 https://registry.npmjs.org/express-generator
npm ERR! error rolling back Error: Refusing to delete: /usr/local/bin/express not in /usr/local/lib/node_modules/express-generator
npm ERR! error rolling back at clobberFail (/usr/local/lib/node_modules/npm/lib/utils/gently-rm.js:57:12)
npm ERR! error rolling back at next (/usr/local/lib/node_modules/npm/lib/utils/gently-rm.js:43:14)
npm ERR! error rolling back at /usr/local/lib/node_modules/npm/lib/utils/gently-rm.js:52:12
npm ERR! error rolling back at Object.oncomplete (fs.js:107:15)
npm ERR! error rolling back express-generator@4.0.0 { [Error: Refusing to delete: /usr/local/bin/express not in /usr/local/lib/node_modules/express-generator] code: 'EEXIST', path: '/usr/local/bin/express' }
npm ERR! Refusing to delete: /usr/local/bin/express not in /usr/local/lib/node_modules/express-generator
File exists: /usr/local/bin/express
Move it away, and try again.
npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "express-generator"
npm ERR! cwd /Users/yaapa/hacklab
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! path /usr/local/bin/express
npm ERR! code EEXIST
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/yaapa/hacklab/npm-debug.log
npm ERR! not ok code 0
I resolved it by manually deleting /usr/local/bin/express, but someone inexprienced may be left scratching their head. It would be great if this case is handled seamlessly.
I had an old installation of
express
(3.4.8), when I triedsudo npm install -g express-generator
, I got this:I resolved it by manually deleting
/usr/local/bin/express
, but someone inexprienced may be left scratching their head. It would be great if this case is handled seamlessly.