sudo npm install -g yo 输入 yo webapp 无效

zandeMacBook-Pro:yo zan$ sudo npm install -g yo
Password:
 
> spawn-sync@1.0.13 postinstall /usr/local/lib/node_modules/yo/node_modules/cross-spawn/node_modules/spawn-sync
> node postinstall

/usr/local/bin/yo -> /usr/local/lib/node_modules/yo/lib/cli.js

> yo@1.4.8 postinstall /usr/local/lib/node_modules/yo
> yodoctor


Yeoman Doctor
Running sanity checks on your system

✔ Global configuration file is valid
✔ NODE_PATH matches the npm root
✔ Node.js version
✔ No .bowerrc file in home directory
✔ No .yo-rc.json file in home directory
✔ npm version

Everything looks all right!
yo@1.4.8 /usr/local/lib/node_modules/yo
├── titleize@1.0.0
├── array-uniq@1.0.2
├── async@1.4.2
├── figures@1.4.0
├── humanize-string@1.0.1 (decamelize@1.0.0)
├── opn@3.0.2 (object-assign@3.0.0)
├── yeoman-character@1.0.1 (supports-color@1.3.1)
├── lodash@3.10.1
├── user-home@2.0.0 (os-homedir@1.0.1)
├── string-length@1.0.1 (strip-ansi@3.0.0)
├── sort-on@1.2.2 (arrify@1.0.0, dot-prop@2.2.0)
├── chalk@1.1.1 (escape-string-regexp@1.0.3, ansi-styles@2.1.0, supports-color@2.0.0, strip-ansi@3.0.0, has-ansi@2.0.0)
├── update-notifier@0.5.0 (is-npm@1.0.0, latest-version@1.0.1, semver-diff@2.0.0)

已经安装好了 

zandeMacBook-Pro:react-yo zan$ yo --help
-bash: /usr/local/bin/yo: No such file or directory
zandeMacBook-Pro:react-yo zan$ yo webapp
-bash: /usr/local/bin/yo: No such file or directory
zandeMacBook-Pro:react-yo zan$


Mac os 系统下

zanjs
浏览 1979回答 0
0回答
打开App,查看更多内容
随时随地看视频慕课网APP