-
-
Notifications
You must be signed in to change notification settings - Fork 259
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
@ember/test-helpers@2 breaks build with mini-css-extract-plugin and ember-auto-import #961
Comments
Can you make a reproduction? It seems difficult to debug from the error message itself... |
Here is the reproduction: https://github.com/andreyfel/mini-css-extract-plugin-with-ember-test-helpers-2-bug |
@rwjblue I've tried to update all the dependencies to latest (ember-cli 3.23, ember-auto-import 1.10, etc.) but it didn't help. |
@rwjblue - we just hit this as well. We're not using |
Not exactly the same or a repro exactly, I've experience a similar problem. embroider-build/ember-auto-import#337 (comment) Explains what's happening. It appears that recent changes cause the parent app the be included twice by |
@rwjblue sorry to bother you, did you have a chance to look at this issue? It prevents us from upgrading to the latest versions of ember-qunit and test-helpers. |
Sorry, I haven't had time to dig into it much yet. I still don't fully understand what is going on though, we aren't using any custom / special webpack config in ember-qunit we just rely on ember-auto-import to do its normal thing 🤔. |
@rwjblue I found this information when I looked at what was happening (from embroider-build/ember-auto-import#337 (comment)) Digging in a bit more, I found this webpack/webpack#10843 seemed to provide a bit of a clue. And when I run ember with the debug flags for auto-import, I see this
So it looks like something is causing the rule to appear twice. If I look through the process using node debugger, I can see that my ember application ends up in the As far as I can tell, the breakage happens on Ember-CLI 3.24, not on 3.23. If I remove "@ember/test-helpers": "2.0.0", and pin - "ember-qunit": "^5.1.1",
+ "ember-qunit": "4.6.0", Then the problem goes away. |
@mfeckie - as I mentioned in the other issue, the problem is not in |
@boris-petrov I agree, my point was that I started seeing the problem when I upgraded to 3.24 because the blueprint uses |
Can y'all double check with |
@rwjblue - at least for me, the problem is resolved. Thanks! |
For some reason, it magically started working! Thanks, @rwjblue! The only change in this version is this PR: #992 Was it because of es6-promise? (seems unrelated) I noticed that
It would be nice to understand the magic behind this change. |
Yes, that was what I suspected.
These docs are correct, the change in #992 removed the need for us to have ember-auto-import when consumed. We only need ember-auto-import (after #992) to handle our own tests importing of |
I'm wondering why |
Hi folks. I'm finding myself being bitten by the same errors/symptoms I'm seeing in this issue. However, upgrading @ember/test-helpers doesn't seem to be fixing things for me. My setup is ever so slightly different to above, however. I didn't hit the error when upgrading to [email protected]. My app is on 3.23.1. However, the version of ember-auto-import being used is 1.10.1 which seems to be the version that this error starts to manifest itself. I have verified that I am also getting the duplicated rules in the ember-auto-import debug out (as per #961 (comment)). In order to try and update to the supposedly patched test helpers, I did the following:
So, unless I misunderstand things, I believe I'm using the patched version of test-helpers that was supposed to fix this bug. However, I'm still experiencing it. I have tried do document things here embroider-build/ember-auto-import#372 Is anyone here able to give me a steer on how to get past this? Is there any reason why being on 3.23.0 could be a contributing factor here? And would getting to Ember 3.25.x fix this? |
We are using
mini-css-extract-plugin
andember-auto-import
to import styles from fullcalendar@5.The config looks like this:
It became possible after this was added to ember-auto-import embroider-build/ember-auto-import#205
It was working fine so far.
I was trying to update our app to ember-qunit@5 and @ember/test-helpers@2. After doing the migration I've started getting the error:
If I remove
@ember/test-helpers
from the package.json the build starts working again. This is why I'm opening the issue against this repo, however, it might be something upstream.The text was updated successfully, but these errors were encountered: