Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loader issue since v1.13.0 #11679

Closed
bastimeyer opened this issue Jul 8, 2015 · 0 comments · Fixed by #11895
Closed

Loader issue since v1.13.0 #11679

bastimeyer opened this issue Jul 8, 2015 · 0 comments · Fixed by #11895

Comments

@bastimeyer
Copy link

Hello,
I've noticed an issue regarding the template-compiler which seems to be related to some changes in the loader package. This issue does only appear in NW.js (Node-Webkit) applications since Ember@1.13.0 when compiling templates in a debug environment.

You will always get the Cannot call compilewithout the template compiler loaded. Please loadember-template-compiler.jsprior to callingcompile`` error when calling Ember.HTMLBars.compile(), even though the `ember-template-compiler.js` has been successfully loaded.

I've found this commit, which is the cause of this issue. The isNode statement is wrong here: NW.js applications also do have the global process object. With this isNode check, the htmlbars-compiler packages will be registered to a second loader registry and are then missing in the main one, leading to the error message.
Checking for an undefined window object fixes the problem...
(Also: simply removing the isNode check will still let the tests succeed... ?!)

Well, I'm sorry, but I can't give you a JSBin demo, since you won't get any errors while running it in a browser, so I created a github gist instead, containing a very simple NW.js application which should demonstrate the problem.

brzpegasus added a commit to brzpegasus/ember.js that referenced this issue Jul 25, 2015
* Check for both `process` and `window` when determining if the environment is Node.
* Closes emberjs#11679.
rwjblue pushed a commit that referenced this issue Jul 26, 2015
* Check for both `process` and `window` when determining if the environment is Node.
* Closes #11679.

(cherry picked from commit 97b1a3d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant