尝试在我的Mac上安装Yeoman,我首先尝试按照文档中的命令...
npm install -g yo
出现错误:
npm ERR! Please try running this command again as root/Administrator.
我再次尝试:
sudo npm install -g yo
但它失败了一半。这是它失败的反馈,它为许多失败的包重复了这种模式。
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/yo/node_modules/yeoman-generator/node_modules/glob/.travis.yml'
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 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "yo"
npm ERR! cwd /Users/vivid
npm ERR! node -v v0.10.7
npm ERR! npm -v 1.2.21
npm ERR! path /usr/local/lib/node_modules/yo/node_modules/yeoman-generator/node_modules/glob/.travis.yml
npm ERR! fstream_path /usr/local/lib/node_modules/yo/node_modules/yeoman-generator/node_modules/glob/.travis.yml
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:107:15)
有什么想法吗?
答案 0 :(得分:0)
我遇到了同样的问题。为我修复的只是首先以root身份登录,使用:
$ su
接下来,安装Yeoman的工作就像一个魅力:
$ npm install -g yo