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

Can't load initializers in globals build #5118

Closed
mmun opened this issue Aug 9, 2017 · 1 comment
Closed

Can't load initializers in globals build #5118

mmun opened this issue Aug 9, 2017 · 1 comment

Comments

@mmun
Copy link
Member

mmun commented Aug 9, 2017

When I try to use canary ember-data in ember-twiddle I get an error.

Uncaught Error: Assertion Failed: An instance initializer cannot be registered without an initialize function
  assert @ ember.debug.js:5989
  assert @ ember.debug.js:17740
  (anonymous) @ ember.debug.js:5115
  registerInstanceInitializers @ ember-data.js:18728
  exports.default @ ember-data.js:18705
  (anonymous) @ ember-data.js:18741
  (anonymous) @ ember-data.js:18751

The problems seems to be rooted at this line, which I believe only runs in the globals build:

footer: '\nrequire("ember-data");\nrequire("ember-load-initializers")["default"](Ember.Application, "ember-data");\n' + dsGlobal + '}).call(this);\n' + emberDataShims

@runspired
Copy link
Contributor

@mmun thanks! yes the initializers changed a bit recently, annoying how the build tooling for globals means we dont quite test the true globals build in our tests

bmac added a commit to bmac/data that referenced this issue Oct 22, 2017
…ectory.

That directory seems to be suggesting to ember-load-initializers that
it is a full initializer object and causing an exception to be thrown
in the globals build.

Fixes emberjs#5118
mattraydub added a commit to swarmbox/data that referenced this issue Dec 15, 2017
+ Rollback Relationships (cherry picked from commit 42e6e56)
+ [BUGFIX] Fix store.createRecord with belongsTo when model has @each observer (cherry picked from commit c257bbb)
+ [BUGFIX emberjs#5274] fixes breaking test for bug emberjs#5274
+ Move initialize-store-service.js out of the instance-initializers directory. (cherry picked from commit f3e1e32) Fixes emberjs#5118
igorT pushed a commit that referenced this issue Jan 29, 2018
…ectory.

That directory seems to be suggesting to ember-load-initializers that
it is a full initializer object and causing an exception to be thrown
in the globals build.

Fixes #5118
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

No branches or pull requests

3 participants