5

fabian@fabian-SATELLITE-C660:/var/www/front-end/my-new-project$ yo angular Error angular

You don't seem to have a generator with the name angular 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. fabian@fabian-SATELLITE-C660:/var/www/front-end/my-new-project$

allel
  • 855
  • 1
  • 12
  • 22

2 Answers2

7

yo doctor a great helper:

fabian@fabian-SATELLITE-C660:/var/www/front-end/my-new-project$ yo 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/lib/nodejs:/usr/lib/node_modules:/usr/share/javascript NPM root = /home/fabian/npm/lib/node_modules

 [Fix] Append the NPM root value to your NODE_PATH variable
   Add this line to your .bashrc
     export NODE_PATH=$NODE_PATH:/home/fabian/npm/lib/node_modules
   Or run this command
     echo "export NODE_PATH=$NODE_PATH:/home/fabian/npm/lib/node_modules" >> ~/.bashrc > && source ~/.bashrc

fabian@fabian-SATELLITE-C660:/var/www/front-end/my-new-project$ echo "export >> NODE_PATH=$NODE_PATH:/home/fabian/npm/lib/node_modules" >> ~/.bashrc > && source ~/.bashrc

fabian@fabian-SATELLITE-C660:/var/www/front-end/my-new-project$ yo doctor [Yeoman Doctor] Everything looks alright!

and now everything works:

fabian@fabian-SATELLITE-C660:/var/www/front-end/my-new-project$ yo angular

    _-----_
   |       |    .--------------------------.
   |--(o)--|    |    Welcome to Yeoman,    |
  `---------´   |   ladies and gentlemen!  |
   ( _´U`_ )    '--------------------------'
   /___A___\    
    |  ~  |     
  __'.___.'__   
´   `  |° ´ Y ` 

Out of the box I include Bootstrap and some AngularJS recommended modules.

allel
  • 855
  • 1
  • 12
  • 22
  • 1
    This was the solution for me. I corrected my node path and updated npm like suggested and my generator was detected and it works after that. – HussienK Dec 17 '15 at 22:00
  • same problem. But yo doctor says "everything is ok". Howto solve? – Tiina Jul 01 '16 at 09:18
0

Probably you installed with sudo, so:

sudo yo angular projectname
Julio Marins
  • 10,039
  • 8
  • 48
  • 54