Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yeoman 'yo webapp' runs, but no files created in directory

I've got Node and Yeoman installed, after going down a wrong path or two (Homebrew install, sudo for Yeoman), I then installed Node correctly with the package on their site (mac os x, mavericks) and reinstalled Yeoman without sudo.

But I think I've borked things up a bit, somehow. After installing the webapp generator (which also worked fine), I go into a yeomantest folder on my Desktop and try to 'yo webapp', but while everything runs and Yeoman says it worked, there is nothing in the folder.

It's creating these files somewhere (because when I run it again, it asks me whether to overwrite or not), I just can't figure out where or why.

Possibly it's because Node installed here: "PATH=/Users/xpeeblix/.node/bin/:$PATH"

Any ideas on how to fix this or what's going on? I'll be eternally grateful and name my first born after you.

Please supply name with answer to collect prize.

like image 489
xpeeblix Avatar asked Feb 13 '14 18:02

xpeeblix


3 Answers

Chances are when working with your broked setup you created a .yo-rc.json file in a parent directory of /yeomantest/.

Yeoman uses .yo-rc.json to determine the root of your project. This allows users to run yo n command from anywhere inside the project directory and have them applied from the correct location.

So, walk up your directory tree and try to find a .yo-rc.json file; then delete it. On OSx and Windows, .named files are hidden by default, you may need to make them visible from your system configuration.

like image 119
Simon Boudrias Avatar answered Nov 11 '22 14:11

Simon Boudrias


Run

yo doctor

It shows if everything look alright

Yeoman Doctor
Running sanity checks on your system

✔ Global configuration file is valid
✔ No .bowerrc file in home directory
✔ No .yo-rc.json file in home directory
✔ NODE_PATH matches the npm root

Everything looks all right!

Remove .bowerrc and .yo-rc.json files from the root directory then run yo to generate files in the current folder.

like image 4
iqbal Avatar answered Nov 11 '22 15:11

iqbal


If you have issues with .bowerrc and .yo-rc.json just run:

rm ~/.bowerrc and rm ~/.yo-rc.json and then run yo doctor again. If the issue was fixed yo doctor will tell you.

Yo was intalling my angular project in the root. Updating Yo didn't do anything for me but removing the previous files fixed it. I hope this help.

like image 1
Labanino Avatar answered Nov 11 '22 14:11

Labanino