FamousArchives / generator-famous

for those who hate doing things once
123 stars 26 forks source link

generator not recognized after installing #2

Closed weisjohn closed 10 years ago

weisjohn commented 10 years ago

after running npm install -g generator-famous :

$ yo famous
Error famous 

You don't seem to have a generator with the name famous installed.
You can see available generators with npm search yeoman-generator and then install them with npm install [name].
To see the 0 registered generators run yo with the `--help` option.
MylesBorins commented 10 years ago

Hey John,

How do you have node installed? Was it with homebrew?

Do you see a folder called generator-famous in /usr/local/share/npm/lib/node_modules ?

On Apr 9, 2014, at 7:26 PM, John Weis notifications@github.com wrote:

after running npm install -g generator-famous:

$ yo famous Error famous

You don't seem to have a generator with the name famous installed. You can see available generators with npm search yeoman-generator and then install them with npm install [name]. To see the 0 registered generators run yo with the --help option. — Reply to this email directly or view it on GitHub.

weisjohn commented 10 years ago

I used nvm.

$ which node
/Users/jweis/.nvm/v0.10.26/bin/node
$ which npm
/Users/jweis/.nvm/v0.10.26/bin/npm
$ which yo
/Users/jweis/.nvm/v0.10.26/bin/yo
$ node -v
v0.10.26
$ npm -v 
1.4.3
$ yo -v
1.1.2
weisjohn commented 10 years ago

Ok, I found the problem. When reinstalling yo directly, it presented a problem:

> yo@1.1.2 postinstall /Users/jweis/.nvm/v0.10.26/lib/node_modules/yo
> node ./scripts/doctor

[Yeoman Doctor] Uh oh, I found potential errors on your machine
---------------

[Error] NPM root value is not in your NODE_PATH
  [info]
    NODE_PATH = /usr/local/lib/node:/usr/local/lib/node_modules
    NPM root  = /Users/jweis/.nvm/v0.10.26/lib/node_modules

  [Fix] Append the NPM root value to your NODE_PATH variable
    Add this line to your .bashrc

Sorry for bothering!

MylesBorins commented 10 years ago

!!!

Great edge case... I will add to the docs that if you are having trouble to try running yo doctor

On Apr 9, 2014, at 7:40 PM, John Weis notifications@github.com wrote:

Closed #2.

— Reply to this email directly or view it on GitHub.

Offirmo commented 10 years ago

Got same error for identical config. What is wrong with nvm ?