ember-headless-form
ember-headless-form copied to clipboard
error about cached-decorator-polyfill?
Seeing this in my app's error logs after adding headless-form:
Module not found: Error:
ember-headless-form is trying to import from ember-cached-decorator-polyfill but that is not one of its explicit dependencies
Using 1.0.0-beta.3
/docs-app/node_modules/ember-headless-form on popover [!?]
❯ cat package.json | jq '.version'
"1.0.0-beta.3"
Maybe this is an embroider whoopsie (I'm not using the classic build pipeline)
❯ ag cached-decorator --stats
0 matches
0 files contained matches
60 files searched
509375 bytes searched
0.007827 seconds
Weird, ember-cached-decorator-polyfill
seems to trigger weird errors here and there. I was running into https://github.com/embroider-build/ember-auto-import/issues/582 when using headless-table with the latest eai. Though your case is certainly different...
Where do you get ember-cached-decorator-polyfill
from? Your app is on Ember 4.4+? (which should require the polyfill)
My understanding from this is that the transform that introducing @embroider/macros
and an eventual importSync('ember-cached-decorator-polyfill')
is only applied to the parent addon of ember-cached-decorator-polyfill
, so one that depends on it, which this addon does not!? 🤔
So definitely seems goofy, and not the fault of this addon, just not sure whose fault this is...
I'm also seeing this over on https://github.com/CrowdStrike/ember-toucan-core. Reproduction steps:
# clone repo
pnpm i
bash /local-setup.bash # select option 1 or build each addon under packages/*, up to you
cd docs-app
pnpm start
Then the error appears:
webpack 5.75.0 compiled with 1 error and 1 warning in 2409 ms
Build Error (PackagerRunner) in ../node_modules/.pnpm/[email protected]_@glimmer+componen_xgihesckq67deavdobdctlgt6u/node_modules/ember-headless-form/dist/components/headless-form.js
Module build failed (from ../../../../../../../../../workspace/ember-toucan-core/node_modules/.pnpm/[email protected][email protected]/node_modules/thread-loader/dist/cjs.js):
Thread Loader (Worker 2)
$TMPDIR/embroider/835ae7/node_modules/.pnpm/[email protected]_@glimmer+componen_xgihesckq67deavdobdctlgt6u/node_modules/ember-headless-form/dist/components/headless-form.js/headless-form.js: ember-headless-form is trying to import from ember-cached-decorator-polyfill but that is not one of its explicit dependencies
FWIW, CI was happy about this and running pnpm build
is fine, but running pnpm start
throws this error
I wrote down my findings here: https://github.com/embroider-build/embroider/issues/1462.
Reopening as this was accidentally auto-closed...