6

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
> yo@1.1.2 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?

Gabriela Vasselai
  • 222
  • 1
  • 5
  • 13

2 Answers2

10

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!
Gabriela Vasselai
  • 222
  • 1
  • 5
  • 13
  • That really worked! You should mark your own answer as accepted, it is perfectly OK and may give a hint to future users that this is a reliable solution. – davidkonrad Feb 03 '16 at 14:37
1

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

mamdouh alramadan
  • 8,349
  • 6
  • 36
  • 53
  • I got a 'not installed in /home/gabriela/npm/lib/node_modules: "grunt"' and 'not installed in /home/gabriela/npm/lib/node_modules: "yo"' but bower got uninstalled: 'unbuild bower@1.3.4'. – Gabriela Vasselai Jun 03 '14 at 23:02
  • @GabrielaVasselai - check this [question](http://stackoverflow.com/questions/22642655/how-to-uninstall-npm-package) on how to uninstall – mamdouh alramadan Jun 03 '14 at 23:02
  • Sorry, I forgot -g when uninstalling grunt-cli and yo. Now I got a 'unbuild yo@1.1.2' and also a 'unbuild grunt-cli@0.1.13' but grunt-cli I had to uninstall with sudo. First try gave me a 'Please try running this command again as root/Administrator'. – Gabriela Vasselai Jun 03 '14 at 23:16