yeoman / generator-backbone

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

yo backbone [appname] no longer scaffolds a backbone project #268

Closed qbunt closed 10 years ago

qbunt commented 10 years ago

Example attempt below:

test⇒ yo backbone myapp
   invoke   mocha:app
   create test/bower.json

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

Out of the box I include HTML5 Boilerplate, jQuery, Backbone.js and Modernizr.
[?] What more would you like? (Press <space> to select)
❯⬢ Twitter Bootstrap for Sass
 ⬡ Use CoffeeScript
 ⬡ Use RequireJs   create test/.bowerrc
   create test/spec/test.js
   create test/index.html

This also appears to stall after scaffolding the test directory, and stops scaffolding entirely, so this generator appears to no longer scaffold effectively at all.

This is on Yeoman v1.2.0, Node v0.10.26. Let me know if you've got questions, happy to help out in any way.

stefanray commented 10 years ago

I have exactly the same problem after installing yeoman/generator-backbone on a new machine this evening!

revathskumar commented 10 years ago

Still failed to reproduce on Ubuntu. Are you guys on Mac?

qbunt commented 10 years ago

@revathskumar I am on OS X Mavericks 10.9.3, yes.

stefanray commented 10 years ago

I'm on ubuntu 14.04 node v0.10.29 yo v1.2.0

CraigWarford commented 10 years ago

I'm on Windows 7, tried both in a Git bash and node.js command window. Default "yo backbone" seems to skip the options and start installation (but really, it's waiting on the options selection), and continuing with a default installation puts everything (except .yo-rc.json) into the "test" folder. It's definitely broken, if a default install does that...

sethgho commented 10 years ago

Having similar problems here. OSX 10.9.3 node 0.10.28 yo 1.2.0 generator-backbone 0.3.0

Reverting generator-backbone to 0.2.8 seems to be generating a complete app.

revathskumar commented 10 years ago

Now I am able to reproduce the issue. Working on the fix.

revathskumar commented 10 years ago

Please try to install generator-mocha from github. npm install -g yeoman/generator-mocha

Lemme know whether it solves the issue.

sethgho commented 10 years ago

Yep. It's working for me now. :thumbsup:

revathskumar commented 10 years ago

@sethgho Whether it installs the bower and npm modules ?

qbunt commented 10 years ago

@revathskumar I just ran your suggestion npm install -g yeoman/generator-mocha and that did not fix the issue for me. I do get the following error message once the Mocha generator's been installed.

test|⇒ yo backbone myapp
Error backbone myapp 

You don't seem to have a generator with the name mocha:app installed.
You can see available generators with npm search yeoman-generator and then install them with npm install [name].
To see the 35 registered generators run yo with the `--help` option.

It also looks like the generator is actually installed, just without the Mocha:app subgenerator installed

Backbone
  backbone:all
  backbone:app
  backbone:collection
  backbone:model
  backbone:router
  backbone:view

Backbone-mocha
  backbone-mocha:collection
  backbone-mocha:model
  backbone-mocha:router
  backbone-mocha:view

Let me know if you'd like me to try anything else, happy to help out.

oakley808 commented 10 years ago

I'm getting the same results as @qbunt.

OSX 10.9.3 node 0.10.26 yo 1.2.0 generator-backbone 0.3.0

0xbboyd commented 10 years ago

I am also having this problem.

OSX 10.9.2 node 0.10.29 yo 1.2.0 generator-backbone 0.3.0

revathskumar commented 10 years ago

@qbunt It looks like the generator-mocha is not installed successfully.

@oakley808 @bboydGensler Did you guys tried npm install -g yeoman/generator-mocha

anthonyray commented 10 years ago

Installing the generator-mocha solves the issue, but it's required to issue : bower install & npm install manually ...

troyericg commented 10 years ago

Even with generator-mocha installed and a fresh install of the backbone generator, I'm still getting my options skipped and the installation of everything into that "test" folder.

serv commented 10 years ago

Having the same issue

OS X 10.9.3 node v0.10.29 npm 1.4.14 yo 1.2.0

serv commented 10 years ago

@revathskumar, your fix worked but like @anthonyray said, I needed to manually run

$ bower install 
$ npm install

It's a bit confusing that the generator fails silently after saying I'm all done. Running bower install & npm install for you to install the required dependencies. If this fails, try running the command yourself., so I didn't know if it failed or not.

oakley808 commented 10 years ago

Hmm.... no luck here.

sudo npm install -g yeoman generator-mocha generator-backbone

then

$ yo backbone myapp
Error backbone myapp 

You don't seem to have a generator with the name mocha:app installed.
You can see available generators with npm search yeoman-generator and then install them with npm install [name].
To see the 15 registered generators run yo with the `--help` option.
amiredry commented 10 years ago

Having the same issue on Ubuntu 14.04.

npm install -g yeoman/generator-mocha

Fixed it but also had to run

bower install & npm install

to be able to use Grunt.

calvinkhuang commented 10 years ago

Ubuntu 14.04, npm 1.3.10~dfsg-1 yo 1.1.2 generator-mocha 0.1.3 generator-backbone 0.3.0 generator-backbone-mocha 0.0.3

$ yo backbone
Error backbone 

You don't seem to have a generator with the name mocha:app installed.
You can see available generators with npm search yeoman-generator and then install them with npm install [name].
To see the 26 registered generators run yo with the `--help` option.
$ yo --help
Usage: yo GENERATOR [args] [options]

General options:
  -h, --help     # Print generator's options and usage
  -f, --force    # Overwrite files that already exist

Please choose a generator below.

Angular
  angular:app
  angular:common
  angular:constant
  angular:controller
  angular:decorator
  angular:directive
  angular:factory
  angular:filter
  angular:main
  angular:provider
  angular:route
  angular:service
  angular:value
  angular:view

Backbone
  backbone:all
  backbone:app
  backbone:collection
  backbone:model
  backbone:router
  backbone:view

Backbone-mocha
  backbone-mocha:collection
  backbone-mocha:model
  backbone-mocha:router
  backbone-mocha:view

Karma
  karma:app

Web-starter-kit
  web-starter-kit:app

Previously, I had yo backbone generating part of the app in a test folder (it would display the initial prompt twice, at first giving the chance to select my options, but later on always going to bower install immediately). However, now it won't even start the generator.

TheBranchDriftCatalyst commented 10 years ago

I am having similar problems as explained above. When i do the fix the yo generator ends before bower install & npm install is run. When i manually run those commands the modules are installed properly (or so it appears) however whenever i use the backbone:generators. The path is pointing to the ../myapp folder. So my views and routes and models are beign created in a folder such as ../public/* rather than ./public/views etc.

robhuzzey commented 10 years ago

I've had the same issues today. As a temporary fix I did npm install -g generator-backbone@0.2.8 to get me working again.

qbunt commented 10 years ago

@robhuzzey doing the same. No problems so far.

cobookman commented 10 years ago

Using OS X Mavericks 10.9.4 After I ran

npm install -g yeoman/generator
yo backbone
npm install && bower install

All the 'scafolding' seems to be there.
But, running grunt test and/or grunt produces the following error: Warning: PhantomJS timed out, possibly due to a missing Mocha run() call. Use --force to continue.

seyade commented 10 years ago

I also get the same issue with jasmine as the test framework... I had to revert to generator-backbone@0.2.8 to make it work, and it's fine.

Is there gonna be a fix for version 3?

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.

qbunt commented 10 years ago

npm install -g yeoman/generator-mocha @revathskumar this does appear to fix the issue of the entire app not scaffolding. It appears that npm install and bower install are not being called automatically, maybe there's something else at work here?

heldrida commented 10 years ago

@revathskumar I also tested and didn't worked for me. Running on Ubuntu 12.04 LTS

evelynriossf commented 10 years ago

Still not working for me. Using OS X Mavericks 10.9.4

Ran: npm install -g yeoman/generator-backbone npm install -g yeoman/generator-mocha

Test 1: yo backbone yeomantest1 --template-framework=handlebars --test-framework=jasmine puts everything except .yo-rc.json into the test folder.

Test 2: yo backbone yeomantest2 --template-framework=handlebars puts everything in the correct place. However, running grunt test produces the following error: Warning: PhantomJS timed out, possibly due to a missing Mocha run() call. Use --force to continue.

Test3: Reverted to npm install -g generator-backbone@0.2.8. Ran bower install and npm install manually. Scaffold works correctly & grunt test runs successfully.

benjamingsmith commented 10 years ago

Thank you, @evelynriossf! "npm install -g generator-backbone@0.2.8" worked for me.

kirach commented 10 years ago

Any chance this will be fixed in the near future?

neoblackcap commented 10 years ago

@evelynriossf ,thanks. the generator-backbone@0.2.8 work well.

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. :(

Other generators (like webapp) work fine.

Versions:

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

Thank you, @evelynriossf! That worked for me as well.

mathieubellon commented 10 years ago

@evelynriossf that did work for us too, thanks !!

revathskumar commented 10 years ago

Please update the backbone generator to 0.3.1 and lemme know if this issue persists?

qbunt commented 10 years ago

@revathskumar looks like 0.3.1 is back to scaffolding an app, though it's not running the npm install && bower install as it mentions in the output. Should I open a new issue for that, as it appears that this issue is fixed?

qbunt commented 10 years ago

Actually, looks like some of the sub-generators are referencing classes that aren't there. I don't think that's how 0.2.8 ran, investigating further.

Update: Nope, I was wrong, 0.2.8 does the same.

revathskumar commented 10 years ago

@qbunt Thanks for quick reply, The bower and npm installation issue is not directly related to backbone generator I already fixed it in mocha generator (yeoman/generator-mocha#21). will get fixed by next release of mocha generator

revathskumar commented 10 years ago

some of the sub-generators are referencing classes that aren't there

Which sub-generator? What classes? Can you open a new issue regarding this?

qbunt commented 10 years ago

@revathskumar cheers and thanks for the fix and info man.

qbunt commented 10 years ago

the sub-generators are scaffolding everything they were in 0.2.8 (possibly without the test specs) let me run this for a while and open a new issue if needed. Thanks again @revathskumar

jeffwesson commented 9 years ago

:+1: to @revathskumar for npm install -g yeoman/generator-mocha