【发布时间】:2014-07-24 10:30:54
【问题描述】:
我已经安装了 chris lea 版本的 nodejs:
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs npm
比使用 npm 安装 yeoman、grund-cli 和 bower:
sudo npm install -g yo grunt-cli bower
一切都很好,包括“[Yeoman Doctor] 一切看起来都很好!”在 yeoman 安装结束时。
/home/gabriela/npm/bin/yo -> /home/gabriela/npm/lib/node_modules/yo/cli.js
> yo@1.1.2 postinstall /home/gabriela/npm/lib/node_modules/yo
> node ./scripts/doctor
比我跑:
gabriela@Gabriela-Ubuntu:~$ which node
/usr/bin/node
gabriela@Gabriela-Ubuntu:~$ which npm
/usr/bin/npm
gabriela@Gabriela-Ubuntu:~$ which bower
/usr/bin/bower
gabriela@Gabriela-Ubuntu:~$ which yo
gabriela@Gabriela-Ubuntu:~$ yo
yo: command not found
gabriela@Gabriela-Ubuntu:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:$JAVA_HOME:$JRE_HOME
出了什么问题?我是否必须执行任何其他命令才能正确安装 yeoman?
【问题讨论】:
-
你运行的是哪个节点版本
-
“node -v”给了我“v0.10.28”
-
npm --version 怎么样
-
这是你的问题-我相信-看看我的答案
-
根据这个链接Node v0.10.28 (Stable),node v0.10.28 在 1.4.9 与 npm 一起工作。