Gabriela Vasselai
Gabriela Vasselai

Reputation: 222

yo: command not found

I've installed nodejs with chris lea's version:

sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs npm

Than installed yeoman, grund-cli and bower using npm:

sudo npm install -g yo grunt-cli bower

Everything went alright including the "[Yeoman Doctor] Everything looks alright!" at the end of yeoman's install.

/home/gabriela/npm/bin/yo -> /home/gabriela/npm/lib/node_modules/yo/cli.js
> [email protected] postinstall /home/gabriela/npm/lib/node_modules/yo
> node ./scripts/doctor

Than I run:

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

What went wrong? Do I have to execute any other command to install yeoman properly?

Upvotes: 6

Views: 7339

Answers (2)

Gabriela Vasselai
Gabriela Vasselai

Reputation: 222

I really don't know why the heck it got lost. So after a bunch of tests I resolved creating a symbolic link.

gabriela@Gabriela-Ubuntu:/$ sudo ln -s /home/gabriela/npm/bin/yo /usr/bin/yo
gabriela@Gabriela-Ubuntu:/$ yo
[?] What would you like to do? (Use arrow keys)
‣ Run the Angular-bootstrap generator (0.4.1) 
  Update your generators 
  Install a generator 
  Find some help 
  Get me out of here!

Upvotes: 10

mamdouh alramadan
mamdouh alramadan

Reputation: 8528

from the documentation getting started yo will install bower and grunt. what you need to do is to delete grunt and yo then re-install just yo

npm uninstall -g grunt yo

npm install -g yo

npm install -g yo

If you are using npm 1.2.10 or above, this will also automatically install grunt and bower for you. If you're on an older version of npm, you will need to install them manually

If you have installed Grunt globally in the past, you will need to remove it first: npm uninstall -g grunt

Upvotes: 1

Related Questions