Open NullVoxPopuli opened 2 years ago
specifically, I think this works with app with ember-source@3.25.3, but not with app with ember-source@3.25.4
I'll try 3.25.3 before attempting a PR
I have the same problem on 3.25.3
I don't understand the thing being reported here, can you be more specific? Have a reproduction?
FWIW, we do use whatever the project has (ember-source wise)
https://github.com/babel/ember-cli-babel/blob/315df8af07bdc755c7529578dd48f5e25e2930d9/index.js#L88
trying to get debug-info atm -- giving up on vscode on this machine :upside_down_face:
The surface issue I'm trying to address is this error:
Could not find module @ember/component imported from (my module)
ok, so after a bunch of debugging, I've determined that in booting my app,
false
(expected)` except when ember-source itself is building
all invocations of emberVersionRequiresModulesAPIPolyfill return true
(expected)
Odbservations:
@embroider/macros
is involved pretty early on in the call stack, almost immediately after calling app.toTree()
in the app's ember-cli-build.jsbuildEmberBundles
this ember version matches the expected version (in monorepo, app has 3.25.4, addon has 3.28.8)
<app> on <branch>
❯ cat <path-to-root>node_modules/ember-source/package.json | jq '.version'
"3.25.4"
can you make a repro? would it be a monorepo with two ember-source versions?
Seems related to: https://github.com/emberjs/ember.js/issues/19700
can you make a repro? would it be a monorepo with two ember-source versions?
yup, can do! :tada:
yup, can do!
turns out, it's not so easy! I'll have to compare my repro with whatever is going on with my work monorepo tomorrow
ooo, I did it. link here: https://github.com/NullVoxPopuli/repro-ember-pre-and-post-3-27-compat
@rwjblue ^
Seems related to: emberjs/ember.js#19700
I just discover this issue, exact same for me, not working when my addon is linked (via yarn), but it works when referring the published addon.
I'm facing this issue too, here's a repro https://github.com/prysmex/ember-eui/tree/update-3.24.0
If you downgrade packages/core
from ~3.27.2
to 3.26.2
it should work.
I think it's because addons are resolving their capabilities local to them rather than the host app. because
setComponentTemplate
(used in the output of co-located components), is referenced asEmber._setComponentTemplate
in the app, and in the addon, referenced as:_component.setComponentTemplate
(an import from the module (and real modules don't exist until ember-source@3.27)).shouldn't ember-cli-babel ignore whatever is going on in the addon, and determine ember-source version from the host app?