generator-backbone icon indicating copy to clipboard operation
generator-backbone copied to clipboard

Only generating test directory and .yo-rc.json

Open punkbit opened this issue 12 years ago • 20 comments

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!

punkbit avatar Jul 13 '14 18:07 punkbit

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!

punkbit avatar Jul 13 '14 18:07 punkbit

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

jmwohl avatar Jul 14 '14 00:07 jmwohl

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.

cleaver avatar Jul 14 '14 00:07 cleaver

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

revathskumar avatar Jul 16 '14 18:07 revathskumar

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

punkbit avatar Jul 16 '14 18:07 punkbit

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.

revathskumar avatar Jul 23 '14 09:07 revathskumar

@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

punkbit avatar Jul 26 '14 23:07 punkbit

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

alexlavr avatar Jul 28 '14 20:07 alexlavr

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

revathskumar avatar Jul 28 '14 20:07 revathskumar

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.

evelynriossf avatar Aug 04 '14 08:08 evelynriossf

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

cleaver avatar Aug 04 '14 17:08 cleaver

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

evelynriossf avatar Aug 05 '14 04:08 evelynriossf

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

michaelgiles avatar Aug 07 '14 22:08 michaelgiles

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.

fernandomantoan avatar Aug 20 '14 00:08 fernandomantoan

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

gamaralf avatar Aug 29 '14 18:08 gamaralf

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

wonderfool avatar Aug 29 '14 19:08 wonderfool

Ok. @wonderfool me too.

heat avatar Sep 01 '14 17:09 heat

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

revathskumar avatar Sep 08 '14 20:09 revathskumar

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

fernandomantoan avatar Sep 08 '14 22:09 fernandomantoan

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?

jeloi avatar Sep 12 '14 02:09 jeloi