kimroen / ember-cli-coffeescript

Adds precompilation of CoffeeScript files and all the basic generation types to the ember generate command.
MIT License
72 stars 49 forks source link

Could not find module appname/app #70

Closed devinrhode2 closed 9 years ago

devinrhode2 commented 9 years ago

I'm getting this error because in appname.js, there is no define('appname/app' call, so when the application tries to start (require('appname/app')['default'].create({...})), it can't find the appname/app module because it was never defined. Why isn't this define call being output into assets/appname.js? I see many other modules are being defined. Presumably appname/app refers to the Ember.Application exported in appname/app/app.js, or in the case of using coffeescript, app.coffee. I see that this module hasn't been updated recently, so I'm guessing ember-cli 0.2.0 broke something and this needs to be updated.

When I use a plain app.js file generated by ember init, instead of an app.coffee file, the issue goes away.

Note: I'm actually using coffees6 but that module ultimately just passes things onto this module.

You can see the error printed in the console on my project at this commit here: https://github.com/devinrhode2/major-domo/tree/95cfed62b88c29f07c5f4f7ef1580f43d668f390

kimroen commented 9 years ago

That's strange - I've not heard of anyone else having problems with this addon and ember-cli 0.2.0. It looks like ember-cli-coffees6 might not be quite ready yet though. This seems related: https://github.com/alexspeller/ember-cli-coffees6/issues/8

Outputting the define-statement all happens after addons are processed, so I don't have any initial ideas as to what specifically it could be.

I'll look in to this more if you could verify that this is actually a problem with this addon.

Also, the latest release of ember-cli-coffeescript was 4 days ago, so maybe make sure you're depending on the latest version?

devinrhode2 commented 9 years ago

The error does indeed seem to be caused by the coffees6 addon, I open the issue over there.

alexspeller commented 9 years ago

FYI there has been a massive upgrade to ember-cli-coffees6 that should solve these issues now

kimroen commented 9 years ago

Awesome!