Closed jonnedeprez closed 7 years ago
Hi, just upgraded to ember-moment@7.4.0 and I'm getting the same error. Alson on ember-cli@2.14.1
The issue seems to be that Babel can't transpile the
require('ember-getowner-polyfill')
in get-owner.js. I'm checking if I can make it work by disabling some babel plugins
I'm seeing the same error with ember-cli: 2.12.3
and ember-moment: 7.4.0
. Downgrade to ember-moment: 7.3.1
fixed the issue.
This
require('ember-getowner-polyfill')
line is a trick to get a conditional import of that module, which you can't do with ES6 import. But babel doesn't deal with it. For now, I'm going with a fork of this project. Does anyone have an idea for a real fix?
@jonnedeprez Thank you for your temporary solution. :bow:
This addon should be updated to depend on ember-getowner-polyfill@2.0.1 directly. The newer versions of that polyfill are a true polyfill, so there is no need to require a custom module like is done now. Once that is updated the aaddon/utils/get-owner.js
file should be removed (or simplified to just export default Ember.getOwner
).
Versioned as 7.4.1 - thanks everyone
When I create a new Ember project using ember-cli 2.14.1 and install ember-moment as the only addon, the app doesn't boot:
ember s