Yeoman is installed but no output is seen when attempt is made to run angular generator

StackOverflow https://stackoverflow.com//questions/20000721

  •  20-12-2019
  •  | 
  •  

문제

No error appears when I run

yo angular appname

I have already installed yeoman and I am using ubuntu 12.10

도움이 되었습니까?

해결책

Reinstall the yeoman

sudo npm install -g yo

Watch out for the last part of your installation.

enter image description here

Notice that for my output,

/usr/bin/yo -> /usr/lib/node_modules/yo/bin/yo

My solution is

sudo nano ~/.bash_profile

Inside the ~/.bash_profile

export PATH=/usr/bin:/usr/lib/node_modules:$PATH

Basically add the paths where yo belongs to

Then execute the .bash_profile

. ~/.bash_profile

Now you can run the yo angular appname

다른 팁

If you have updated nodejs to latest version (Mine is v0.10.33)

Open /usr/lib/node_modules/yo/cli.js
and update #!/usr/bin/env node to #!/usr/bin/env nodejs

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top