Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error about cached-decorator-polyfill? #146

Open
NullVoxPopuli opened this issue Jun 1, 2023 · 3 comments
Open

error about cached-decorator-polyfill? #146

NullVoxPopuli opened this issue Jun 1, 2023 · 3 comments

Comments

@NullVoxPopuli
Copy link
Contributor

NullVoxPopuli commented Jun 1, 2023

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
@simonihmig
Copy link
Contributor

Weird, ember-cached-decorator-polyfill seems to trigger weird errors here and there. I was running into embroider-build/ember-auto-import#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...

@ynotdraw
Copy link
Contributor

ynotdraw commented Jun 6, 2023

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

@simonihmig
Copy link
Contributor

I wrote down my findings here: embroider-build/embroider#1462.

Reopening as this was accidentally auto-closed...

@simonihmig simonihmig reopened this Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants