2013-01-11 78 views
2

具有通過NPM 安裝柔術問題我有節點0.8.17和NPM 1.2.0在我的Mac OSX安裝IM 10.6.8柔術未能安裝OSX [節點0.8.17和NPM 1.2.0] WTF

當我運行

$ sudo的NPM安裝柔術-g 首先,它發出警告發現

npm WARN package.json [email protected] No README.md file found! 

則出現錯誤沒有自述文件:

npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/jitsu/node_modules/request/tests/test-toJSON.js' 
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! [email protected] 

npm ERR! System Darwin 10.8.0 
npm ERR! command "node" "/usr/local/bin/npm" "install" "jitsu" "-g" 
npm ERR! cwd /usr/local/share 
npm ERR! node -v v0.8.17 
npm ERR! npm -v 1.2.0 
npm ERR! path /usr/local/lib/node_modules/jitsu/node_modules/request/tests/test-toJSON.js 
npm ERR! fstream_path /usr/local/lib/node_modules/jitsu/node_modules/request/tests/test-toJSON.js 
npm ERR! fstream_type File 
npm ERR! fstream_class FileWriter 
npm ERR! code ENOENT 
npm ERR! errno 34 
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26 
npm ERR! fstream_stack Object.oncomplete (fs.js:297:15) 
npm http 304 https://registry.npmjs.org/block-stream 
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/jitsu/node_modules/npm/doc' 
npm ERR! error rolling back [email protected] { [Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/jitsu/node_modules/npm/doc'] 
npm ERR! error rolling back errno: 53, 
npm ERR! error rolling back code: 'ENOTEMPTY', 
npm ERR! error rolling back path: '/usr/local/lib/node_modules/jitsu/node_modules/npm/doc' } 
npm ERR! Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/jitsu/node_modules/flatiron' 
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! [email protected] 

npm ERR! System Darwin 10.8.0 
npm ERR! command "node" "/usr/local/bin/npm" "install" "jitsu" "-g" 
npm ERR! cwd /usr/local/share 
npm ERR! node -v v0.8.17 
npm ERR! npm -v 1.2.0 
npm ERR! path /usr/local/lib/node_modules/jitsu/node_modules/flatiron 
npm ERR! code ENOTEMPTY 
npm ERR! errno 53 
npm ERR! EEXIST, mkdir '/usr/local/lib/node_modules/jitsu/node_modules/wizard/node_modules/prompt/docs' 
File exists: /usr/local/lib/node_modules/jitsu/node_modules/wizard/node_modules/prompt/docs 
Move it away, and try again. 

npm ERR! System Darwin 10.8.0 
npm ERR! command "node" "/usr/local/bin/npm" "install" "jitsu" "-g" 
npm ERR! cwd /usr/local/share 
npm ERR! node -v v0.8.17 
npm ERR! npm -v 1.2.0 
npm ERR! path /usr/local/lib/node_modules/jitsu/node_modules/wizard/node_modules/prompt/docs 
npm ERR! fstream_path /usr/local/lib/node_modules/jitsu/node_modules/wizard/node_modules/prompt/docs/docco.css 
npm ERR! fstream_type File 
npm ERR! fstream_class FileWriter 
npm ERR! code EEXIST 
npm ERR! errno 47 
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:171:23 
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53 
npm ERR! fstream_stack Object.oncomplete (fs.js:297:15) 
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/jitsu/node_modules/fstream-npm/node_modules/fstream-ignore/test/.npmignore' 
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! [email protected] 

npm ERR! System Darwin 10.8.0 
npm ERR! command "node" "/usr/local/bin/npm" "install" "jitsu" "-g" 
npm ERR! cwd /usr/local/share 
npm ERR! node -v v0.8.17 
npm ERR! npm -v 1.2.0 
npm ERR! path /usr/local/lib/node_modules/jitsu/node_modules/fstream-npm/node_modules/fstream-ignore/test/.npmignore 
npm ERR! fstream_path /usr/local/lib/node_modules/jitsu/node_modules/fstream-npm/node_modules/fstream-ignore/test/.npmignore 
npm ERR! fstream_type File 
npm ERR! fstream_class FileWriter 
npm ERR! code ENOENT 
npm ERR! errno 34 
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26 
npm ERR! fstream_stack Object.oncomplete (fs.js:297:15) 

對此有何幫助?

回答

2

首先刪除舊的jitsu目錄:[sudo] rm -rf /usr/local/lib/node_modules/jitsu。然後清除您的NPM緩存:npm cache clear,然後再試一次:[sudo] npm install jitsu -g

+0

我已經這樣做了,仍然有錯誤 –

+0

'NPM ERR錯誤:!EACCES,MKDIR '在/ usr/local/lib目錄/ node_modules /柔術' ' –

+0

你在跑步嗎?在根?你可能應該。 – CodeRarity

3

其他任何人有這個問題,你需要2個命令:

npm cache clear 
sudo npm install jitsu -g 

在Nodejitsu「S github上,他們建議,而不[須藤] OSX上安裝它但似乎未能在10.6.8

快樂編碼

+0

我有這個問題,這些命令並沒有解決它,直到我還運行「sudo npm update npm -g」來更新npm本身。 – Aaron