-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Cypress - Error: Webpack Compilation Error, Module parse failed: Unexpected token #15737
Comments
I had a similar error after migrating to 15.8.6. I had to downgrade to 15.8.5 and then the builds worked. No other code was changed. |
@charleskoehl thanks for chipping in, I've also tried it with the 15.8.7, but no change. |
I've just noticed that if I exclude my newly generated library, that I've abstracted the code from the application to create it, then the tests start passing. |
This seems relevant: #15794 |
It is not obvious to me that they are related. The reason why my problem was occurring is that I had a file that contained an exported Context and an exported Context provider. This error is not indicative of the exact problem and makes the debugging difficult and time-consuming.
|
Just to confirm, this is a React app created through Can someone share their |
@jaysoo, that is correct.
I've actually resolved it by splitting the content from one shared into multiple shared libraries. |
Interesting, if you have a reproduction I can take a look. Otherwise I'll see if I can reproduce it locally. |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
Everything worked fine up until I abstracted a library from the app.
Now, everything works, except Cypress tests.
However, there are no missing dependencies or syntax errors. Builds pass without any issues, and the runtime also works as it should.
Expected Behavior
It should work as it did before.
GitHub Repo
No response
Steps to Reproduce
Nx Report
Failure Logs
Additional Information
The text was updated successfully, but these errors were encountered: