没有找到命令



我遇到了一个问题,访问Yeoman安装在一个新的Homestead安装。在安装过程中,npm install -g yoyo doctor运行正常,并且在安装过程中没有发现任何问题。然而,在我安装了yeoman之后,yo: command not found是我在VM上得到的错误信息。

vagrant@homestead:~$ npm install -g yo
npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
/home/vagrant/.node/bin/yo -> /home/vagrant/.node/lib/node_modules/yo/lib/cli.js
/home/vagrant/.node/bin/yo-complete -> /home/vagrant/.node/lib/node_modules/yo/lib/completion/index.js
> spawn-sync@1.0.15 postinstall /home/vagrant/.node/lib/node_modules/yo/node_modules/spawn-sync
> node postinstall

> yo@1.8.4 postinstall /home/vagrant/.node/lib/node_modules/yo
> yodoctor

Yeoman Doctor
Running sanity checks on your system
✔ Global configuration file is valid
✔ Node.js version
✔ No .bowerrc file in home directory
✔ No .yo-rc.json file in home directory
✔ npm version
✔ NODE_PATH matches the npm root
Everything looks all right!
/home/vagrant/.node/lib
└─┬ yo@1.8.4
  ├── async@1.5.2
  ├─┬ chalk@1.1.3
  │ ├── ansi-styles@2.2.1
  │ ├── escape-string-regexp@1.0.5
  │ ├── has-ansi@2.0.0
  │ ├── strip-ansi@3.0.1
  │ └── supports-color@2.0.0
  ├── cli-list@0.1.8
[[REMOVED FOR READABILITY]]
  └─┬ yosay@1.2.0
    ├── cli-boxes@1.0.0
    ├── pad-component@0.0.1
    ├─┬ taketalk@1.0.0
    │ ├── get-stdin@4.0.1
    │ └── minimist@1.2.0
    └── wrap-ansi@2.0.0
vagrant@homestead:~$ yo
yo: command not found

我的路径在~/.bashrc说:PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/home/vagrant/.node/lib

我在这里遗漏了什么可能导致这种情况吗?

添加/home/vagrant/.node/bin到您的路径。:)

相关内容

  • 没有找到相关文章

最新更新