-
Notifications
You must be signed in to change notification settings - Fork 137
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
import moment
Error - only during embroider-safe
scenario on Ember 4.12
addon (v1)
#1598
Comments
Looking at the published qunit-parameterize 0.4.0, it doesn't contain any default entrypoint. And the code it does contain doesn't export any name like Perhaps you added some custom configuration to autoImport to make that work? If so, you'll need to also add that kind of custom configuration to embroider. |
I simply have I'm guessing there is an issue here: https://github.com/BBVAEngineering/ember-cli-qunit-parameterize/blob/master/index.js#L8 when on Well I can always remove |
I stopped using But I'm still having a similar error with
|
If I understand correctly, same as with So I believe the issue with Ember 4.12/Embroider-Safe is here somewhere? |
Is it related to embroider-build/ember-auto-import#578 (comment) @ef4 ? 🤔 |
@Pixelik do you have moment as a dev or peer dependency instead of a dev dependency? |
I have moment under devDependencies and under peerDependencies |
does it work if you put it under dependencies instead? |
It works if I add So I guess I should close this issue? 🤷♂️ But if I don't declare it as a |
import moment
Error - only during embroider-safe
scenario on Ember 4.12
addon (v1)
I suspect there is a bug somewhere with detecting which packages are allowed to be imported when a v1 addon has a peer dep declared, so I think this is a valid issue |
Does anyone more knowledgable with embroider have any ideas about this ? |
what package manager and version are you using? |
|
@NullVoxPopuli I've seen this myself with pnpm 8.7.4 as well |
the
is it possible that this is to blame when |
@Pixelik can you please confirm one more thing for me, |
The repo is private I'm afraid and yes we have
|
Hello,
I have the following setup in my ember-addon (v1) :
All of my automated tests (Acceptance, Integration, etc.) are passing in the default scenario ✅
But the
embroider-safe
test scenario (ember-try) is throwing these 2 errors ❌ :qunit_parameterize__WEBPACK_IMPORTED_MODULE_7___default(...) is not a function
Error: Could not find module moment imported from (require)
These errors are thrown due to these imports :
import moment from 'moment'
import { cases } from 'qunit-parameterize'
Note:
@embroider/test-setup
was updated fromv2
tov3
byember-cli-update --- to 4.12
and if I donwgrade it to v2 afterwards myself, the embroider-safe scenario throwsTypeError: this.macrosConfig.packageMoved is not a function
even before it starts executing tests"@embroider/macros": "^1.12.2"
inresolutions
otherwise I get @babel errors when runningember serve
even in the default scenario.The text was updated successfully, but these errors were encountered: