Closed camdub closed 9 years ago
@camdub If it works in dev mode, my guess is that there is some precompiled template, try to add full handlebars (as default is only the runtime) and see if it works.
I ran into this exact problem tonight. Unfortunately it took me quite a while to figure out it was ember-forms. I'd like to help out so it doesn't happen to the next person.
I disabled minification and tracked down the error:
@asaf as you suspected, Ember.Handlebars.compile
is not defined. Could you elaborate on your comment? We shouldn't need to add the Handlebars compiler just to use ember-forms, should we?
@samselikoff I guess we can get ride of compile in runtime requirements, but it will take some time..... If someone has the time to clean these up it'll be great.
For anyone else coming across this issue, here's a less than ideal fix:
Ember CLI doesn't provide the full Handlebars compiler in production, but you can easily include it, see:
http://www.ember-cli.com/#customizing-a-built-in-asset
Longer term, Ember Forms would ideally pre-compile their templates.
+1
Running into this as well
grep -r Handlebars *
result nothing, can someone point out where are the non pre compiled templates?
Thanks
@asaf I think this was before the migration to es6 style and ember-cli. Just tested using last release and I don't have this issue anymore. I'll close #62 as ember-cli handles template compilation.
Running into this as well
@yangbai1991 Sorry I have no time to maintain this project any longer, seeking for maintainers though
Ember-forms is working great, but when I run the ember-cli server in production mode I get an
Uncaught TypeError: undefined is not a function
error. Since this only happens in production, I'm not even sure how to start trying to find the source of this. If I remove ember-forms from my app, it works as normal (except the pages using the forms of course).I suppose I could turn off minification in the production script to try and find the issue.
I am simply including the globals version in my
Brocfile
:app.import('vendor/ember-forms/dist/globals/main.js');
Here is a screenshot of the error message which might help: http://inft.ly/fvPryUr