大家好我试图安装Yeoman然而当我尝试通过npm安装软件包时出现以下错误。
sudo npm install -g yeoman
npm http GET https://registry.npmjs.org/yeoman
npm http 200 https://registry.npmjs.org/yeoman
npm http GET https://registry.npmjs.org/yeoman/-/yeoman-0.9.1.tgz
npm http 200 https://registry.npmjs.org/yeoman/-/yeoman-0.9.1.tgz
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/usr/local/share/npm/lib/node_modules/yeoman/node_modules/grunt/node_modules/nodeunit/node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/.bin'
npm ERR! error rolling back yeoman@0.9.1 { [Error: ENOTEMPTY, rmdir '/usr/local/share/npm/lib/node_modules/yeoman/node_modules/grunt/node_modules/nodeunit/node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/.bin']
npm ERR! error rolling back errno: 53,
npm ERR! error rolling back code: 'ENOTEMPTY',
npm ERR! error rolling back path: '/usr/local/share/npm/lib/node_modules/yeoman/node_modules/grunt/node_modules/nodeunit/node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/.bin' }
npm ERR! Error: ENOTEMPTY, rmdir '/usr/local/share/npm/lib/node_modules/yeoman/node_modules/grunt/node_modules/nodeunit/node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/.bin'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR! System Darwin 11.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "yeoman"
npm ERR! cwd /Users/chris
npm ERR! node -v v0.8.9
npm ERR! npm -v 1.1.61
npm ERR! path /usr/local/share/npm/lib/node_modules/yeoman/node_modules/grunt/node_modules/nodeunit/node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/.bin
npm ERR! code ENOTEMPTY
npm ERR! errno 53
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/chris/npm-debug.log
npm ERR! not ok code 0
之前我使用过node和npm,但我从来没有遇到这样的错误。
答案 0 :(得分:7)
尝试使用notempty
删除某个文件夹时出现rmdir
错误。我不确定为什么会......但是......
rm -rf /usr/local/share/npm/lib/node_modules/yeoman
sudo npm install -g yeoman