JITSU未能安装OSX [node 0.8.17和NPM 1.2.0] WTF

时间:2013-01-11 10:18:04

标签: node.js npm nodejitsu

我在通过NPM安装jitsu时遇到问题 我的mac osx 10.6.8上安装了节点0.8.17和NPM 1.2.0

我跑的时候

$ sudo npm install jitsu -g 首先,它警告没有找到自述文件

npm WARN package.json ladder@0.0.0 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! npm-@googlegroups.com

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 jitsu@0.11.4 { [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! npm-@googlegroups.com

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! npm-@googlegroups.com

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 个答案:

答案 0 :(得分:3)

对于遇到此问题的其他人,您需要2个命令:

npm cache clear
sudo npm install jitsu -g

在Nodejitsu的github上,他们建议在OSX上没有[sudo]的情况下安装它,但似乎在10.6.8上失败

快乐的编码!

答案 1 :(得分:2)

首先删除旧的jitsu目录:[sudo] rm -rf /usr/local/lib/node_modules/jitsu。然后清除您的npm缓存:npm cache clear并再试一次:[sudo] npm install jitsu -g