1

I installed Yeoman with NPM .

Unfortunately it isn't working when I type "yo" in the terminal.

When I type you it says that the command wasn't found.

I tried doing what they say in here How to fix "yo: command not found" after installing Yeoman , but it doesn't seem to work , or perhaps I am just a noob and don't know how to get it working.

It was working before, but when I was trying to fix a permissions problem (because I couldn't install generators) it stopped working. It might be because of some problem with the Path.

Any ideas?

This is what it shows when I start the terminal :https://www.dropbox.com/s/a6t299lzc39vnbt/Screenshot%202014-09-27%2019.13.11.png?dl=0

That big path wasn't there before.

Community
  • 1
  • 1
Luis Valdez
  • 2,339
  • 4
  • 16
  • 21

2 Answers2

0

Make sure you install the yeoman with the global flag like this: npm install -g yeoman

jfornoff
  • 1,368
  • 9
  • 15
0

You need to figure out if yo was actually installed, then fix your path if it was.

To find out if yo was correctly installed globally:

npm config ls -l | grep 'prefix' will tell you the root of where npm tries to install stuff. You can then see if yeoman is installed there by running ls -l <prefix-location>/bin |grep 'yo' where <prefix location> is the value specified for prefix in the first command.

If it exists at that location, then you need to have that location in your path. You can do that like this, temporarily:

export PATH=$PATH:<prefix/bin>

To make that work permanently, you'll need to put that into your .bashrc file or edit any existing PATH setting in there to include the new directory

If it does not actually exist at that location, then you'll need to make sure you have permission to edit the relevant directories. There should be clear error messages that show up when you run the npm install command that can clue you in to why its not being installed.

Ben McCormick
  • 25,260
  • 12
  • 52
  • 71