ember-cli-babel: Another _Ember is undefined error
Symptoms
Same symptoms as #342, but the errors are coming up while loading tests in Travis. Every require fails with this error.
How to replicate
You should be able to replicate by running tests with CI=true.
It’s related to this default line in targets.js. Removing ie 11 as a target removes the issue.
if (isCI || isProduction) {
browsers.push('ie 11');
}
Tested on latest ember-cli-babel@7.20.4.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 20 (7 by maintainers)
Ya, sorry for this taking so long. It took a little while to figure out which specific babel plugins were mutating the nodes, and I only discovered that using the shared AST nodes was causing an issue due to stepping through the tranpsilation process.
#348 should land and be released as 7.20.5 soon.
OK, that sounds a lot like the scenario that @sandydoo called out and provided a reproduction for. I’ll be looking into it this afternoon.
https://github.com/babel/ember-cli-babel/releases/tag/v7.20.5 is published now with the updates from https://github.com/ember-cli/babel-plugin-ember-modules-api-polyfill/pull/109. I tried to explain exactly what was going on in #348 and https://github.com/ember-cli/babel-plugin-ember-modules-api-polyfill/pull/109.
Note: the actual fix was in https://github.com/ember-cli/babel-plugin-ember-modules-api-polyfill/pull/109, so you can almost certainly get these fixes without being on ember-cli-babel@7.20.x, but in order to do so you’d need to ensure your lockfile doesn’t keep the babel-plugin-ember-modules-api-polyfill pinned.
For example, for
yarnusers you can do:babel-plugin-ember-modules-api-polyfillto use2.13.4yarnyarnagain@rwjblue if I turn on
I have the next error:
I use
torii: 0.9.6which depends on"ember-cli-babel": "^6.3.0". But I have a lot of libraries which depend on"ember-cli-babel": "^6.3.0"