yeoman / generator-backbone

Scaffold out a Backbone.js project
http://yeoman.io
638 stars 157 forks source link

Only generating test directory and .yo-rc.json #274

Closed heldrida closed 10 years ago

heldrida commented 10 years ago

Hi,

I've installed this generator using:

npm install -g generator-backbone

But unfortunately, what's only being generated is the test directory and .yo-rc.json file.

I've used Backbone generator (0.3.0) and tried in two different systems. One running Ubuntu server 12.04 LTS and my desktop Ubuntu running 12.10.

Thanks for looking!

heldrida commented 10 years ago

I've installed the version 0.2.8 and works fine. So, 0.3.0 definitely not working on Ubuntu at least, as reported. Thanks!

jmwohl commented 10 years ago

Just confirming — I'm seeing the same issue on mac.

cleaver commented 10 years ago

It appears that the full app is being generated in the test folder. (OSX 10.9.4).

After cd into the "test" directory, it will run from "grunt serve", but a subsequent "yo generate:view MyView" puts the view in the root of the test directory.

revathskumar commented 10 years ago

I think this issue is related with #268. Try installing mocha generator from github npm install -g yeoman/generator-mocha

heldrida commented 10 years ago

@revathskumar thanks for your time! I'll do that next time.

revathskumar commented 10 years ago

The generator-mocha 0.1.4 is released now. Can you guys please update the generator-mocha and let us know whether this issue persist.

heldrida commented 10 years ago

@revathskumar unfortunately I've got the same issue. Running on Ubuntu 12.04 LTS.

The steps were (for backbone-generator 0.3.0):

yo backbone

I get the directory "test" and .yo-rc.json

alexlavr commented 10 years ago

The trick above worked for me: npm install -g yeoman/generator-mocha. Then I had to manually run bower install & npm install.

revathskumar commented 10 years ago

now the generator mocha can be installed from npm itself. npm update -g generator-mocha.

Regarding the bower and npm installation, I already submitted a patch for mocha generator yeoman/generator-mocha#21

evelynriossf commented 10 years ago

I'm getting the exact same issue as cleaver, using the same system. "It appears that the full app is being generated in the test folder. (OSX 10.9.4). After cd into the "test" directory, it will run from "grunt serve", but a subsequent "yo generate:view MyView" puts the view in the root of the test directory." And that was after installing npm update -g generator-mocha. A correct install ONLY worked if I left off the --test-framework=[framework] command, and in that case I had to run bower install and npm install manually.

cleaver commented 10 years ago

After doing npm install -g yeoman/generator-mocha, the problem seems to be resolved for me.

evelynriossf commented 10 years ago

Yeah, did npm install -g yeoman/generator-mocha and still getting the same issue.

michaelgiles commented 10 years ago

I tried the above fix. Unfortunately I'm still getting the same issue.

fernandomantoan commented 10 years ago

Getting the same issue in OSX and generator-mocha 0.1.5.

I could fix it by running yo backbone twice in the same directory.

gamaralf commented 10 years ago

Same problem here. Using Ubuntu 14.04.1 LTS, behind a corporate proxy.

If I run yo backbone on an empty directory, I only get the directory "test" and .yo-rc.json. :(

Versions:

$ yo -v
1.2.1
$ npm -v
1.4.21
$ bower -v
1.3.9
wonderfool commented 10 years ago

Still experiencing the issue here. OSX 10.9.4. Same versions as @gamaralf.

heat commented 10 years ago

Ok. @wonderfool me too.

revathskumar commented 10 years ago

released 0.3.1. Please check if this issue still persists. If persists please lemme know which version of node you are using.

fernandomantoan commented 10 years ago

Just tested here @revathskumar, now it works. Thanks!

jeloi commented 10 years ago

I'm still getting the `Running "mocha:all" (mocha) task Testing: http://localhost:9001/index.html

Warning: PhantomJS timed out, possibly due to a missing Mocha run() call. Use --force to continue.`

error when running grunt test or grunt build. I updated to 0.3.1, and tried a fresh install no luck. I was on node 0.10.28, tried upgrading to 0.10.31 and still no luck. Appreciate any and all help.

UPDATE Running bower install in the test directory resolved the problem. I did, however, have to run npm install and bower install myself.

My questions now is, how do I go about updating my old backbone app generated with the old broken generator? It was originally named test and had a spec dir inside it, and the Mocha index.html was floating around in that dir too.

Also, running yo backbone:model something creates a test file at test/models/trip.spec.js. As far as I can tell, the test watcher in Gruntfile.js only watches for test/spec/**/*.js. Will it therefore not catch the model spec changes, and is this intended?