我在OS X 10.8.5上运行节点0.10.11和npm 1.2.30。尝试使用此命令全局安装bower:
sudo npm install -g bower
但我一直在我的npm-debug.log
:
2872 error Error: ENOENT, lstat
'/usr/local/share/npm/lib/node_modules/bower/node_modules/semver/semver.browser.js'
2873 error If you need help, you may report this log at:
2873 error <http://github.com/isaacs/npm/issues>
2873 error or email it to:
2873 error <npm-@googlegroups.com>
2874 error System Darwin 12.5.0
2875 error command "/usr/local/Cellar/node/0.10.11/bin/node" "/usr/local/bin/npm" "install" "-g" "bower"
2876 error cwd /Users/kdbanman
2877 error node -v v0.10.11
2878 error npm -v 1.2.30
2879 error path /usr/local/share/npm/lib/node_modules/bower/node_modules/semver/semver.browser.js
2880 error fstream_path /usr/local/share/npm/lib/node_modules/bower/node_modules/semver/semver.browser.js
2881 error fstream_type File
2882 error fstream_class FileWriter
2883 error code ENOENT
2884 error errno 34
2885 error fstream_stack /usr/local/Cellar/node/0.10.11/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
2885 error fstream_stack Object.oncomplete (fs.js:107:15)
如果我从邮件列表中获得解决方案,我会在此处发布。我只是 我想确保讨论结束了stackoverflow,因为 人们会发现它比在github问题页面或上更容易 邮件列表。
答案 0 :(得分:0)
没有sudo命令,它对我有用。
$ npm install -g bower