Took the plunge a couple of days ago, using yeoman for a project. After some fiddling I got it to work on my computer, but then something got messed up and now the project is not running anymore. I think the issue has to do with yeoman installing in one place, but the system looking for it in another. I think, but obviously, I don't exactly know where things are going wrong.
I think the two locations are:
Users/brian/
usr/local/lib
usr/local/bin
I am not sure where things should be installing for Yeoman. I realize that initially, I was using sudo to install things and that might have messed some thing up, or that I was using homebrew. I have since uninstalled homebrew and no longer need to use sudo for nom to install stuff.
$ node -v
v0.10.22
$ npm -v
1.3.14
$ echo $NODE_PATH
returns nothing.
$ echo $PATH
/Users/brian/.rvm/gems/ruby-2.0.0-p0/bin:/Users/brian/.rvm/gems/ruby-2.0.0-p0@global/bin:/Users/brian/.rvm/rubies/ruby-2.0.0-p0/bin:/Users/brian/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
$ which npm
returns /usr/local/bin/npm
$ npm install -g yo
Seems to install fine, at the end it says:
/usr/local/bin/yo -> /usr/local/lib/node_modules/yo/bin/yo
yo@1.0.5 /usr/local/lib/node_modules/yo
but if you run yo -v after it says: env: node\r: No such file or directory
If I run:
sudo nano /etc/paths
it shows the following paths, of which I added the last path:
/usr/bin
/bin
/usr/sbins
/usr/local/bin
/usr/local/bin/npm
I have node_modules folders in a number of places.
Users/brian/node_modules
usr/local/lib/node_modules
and a number of other places.
Where are things going wrong? Where should npm install yeoman stuff and how does the system refer to it, so it know where it is when I write stuff like $ yo -v
Thanks a lot for any help with this.
Thank you!