Search code examples
vagrantyeomanhomesteadyo

Command not found


I'm running into a problem with accessing Yeoman after installing it on a fresh Homestead installation. Everything seems fine during the install after npm install -g yo and yo doctor runs just fine and finds no problem during the installation. However, after I've installed yeoman, yo: command not found is the error message I'm getting on my VM.

vagrant@homestead:~$ npm install -g yo
npm WARN deprecated [email protected]: 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

> [email protected] postinstall /home/vagrant/.node/lib/node_modules/yo/node_modules/spawn-sync
> node postinstall


> [email protected] 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
└─┬ [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ └── [email protected]
  ├── [email protected]
[[REMOVED FOR READABILITY]]
  └─┬ [email protected]
    ├── [email protected]
    ├── [email protected]
    ├─┬ [email protected]
    │ ├── [email protected]
    │ └── [email protected]
    └── [email protected]

vagrant@homestead:~$ yo
yo: command not found

My path in ~/.bashrc says the following: PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/home/vagrant/.node/lib

Is there anything else that I'm missing here that might be causing this?


Solution

  • Add /home/vagrant/.node/bin to your path. :)