Closed TRMW closed 6 years ago
The only correct way forward is to use the Ember.getOwner()
API. Right now, the workaround only works because Ember maintains backwards compatibility. If one looks at his debug console, one should see deprecation warnings, though.
(I'm mostly just submitting this so future people will find something when Googling for this error.)
Production (but not dev) builds of Ember 2.13 seem to error out before anything is rendered with this error:
I don't entirely understand why this is happening, but seems related to this Ember issue:
emberjs/ember.js#15322
It happens when Ember goes to look up the container injections for the
route
type, seesstore:main
(registered by Ember Model), and tries to initialize theEmber.Model.Store
object for the first time. It then gets into this block and tries to doEmber.getOwner(this).__container__
(I believethis
is the store here) wheregetOwner
returnsundefined
:I hacked around it on our custom fork of Ember Model by just commenting out the
container: null
line here:I've verified that fixes the error.
There might be a more correct fix for this that involved making Ember Model work correctly with the new
getOwner()
container API, or maybe Ember needs to fix the linked issue.