thefrontside / ember-let

Create variable bindings inside your handlebars templates
MIT License
52 stars 16 forks source link

Ember 2.12.2: Could not find module `ember` imported from `(require)` #36

Open jurgenwerk opened 7 years ago

jurgenwerk commented 7 years ago

Version of ember-let:

0.5.4

Ember Version / Ember CLI Version:

Ember Version: 2.12.2 Ember CLI Version: 2.12.2

Behavior

After upgrading from 2.10.0 to 2.12.2, ember-let (latest, 0.5.4) is crashing my app on load in the browser (it builds without errors though):

image

The offending code from this add-on:

image

If I remove ember-let from my app, things work fine. Any near future plans to make this work with the newest Ember?

rwjblue commented 7 years ago

There were some changes internal to Glimmer which were released in ember 2.12 that we will have to account for, but this specific issue seems different (unless there are other errors being emitted too). This looks like (for some reason) the ember module is not present when we require it.

One possible reason for this is that ember-cli-shims (which is the thing responsible for creating the ember module) is not loaded yet when our vendor asset is processed (but in older versions ember-cli-shims was a bower dep and therefore loaded much earlier).

If that is the cause of this error, the solution is somewhat easy: we need to instruct this addon to load after ember-cli-shims. See this as an example: https://github.com/workmanw/ember-qunit-assert-helpers/blob/f94c498f6bbda205401ac5fef1328c9d587f20af/package.json#L53-L56 (but with ember-cli-shims instead of ember-cli-qunit).

Would mind making a PR for that? Then we can start seeing what other issues we might have to fix...

jurgenwerk commented 7 years ago

Thanks @rwjblue! Loading after ember-cli-shims solves the problem. Here is the PR: #37

ming-codes commented 7 years ago

Ember 2.13 is now released. We're starting to see this as blocker for upgrade.

ming-codes commented 7 years ago

Any update on this?

rwjblue commented 7 years ago

https://github.com/emberjs/ember.js/pull/15208 should unblock things