-
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
Fail to run web dev server after upgrading to 16.5 (React) #18161
Comments
@elizww which version did you migrate from? Also, do you have a reproduction of this somewhere I can inspect? |
16.2.2 I will try to reproduce |
I also have the same issue:
And here is steps on how I get it:
I don't know why it happened |
Sounds like an issue with mismatched versions in babel packages, or a bug in a patch version? Can you try using "resolutions": {
"@babel/core": "7.22.9",
"@babel/preset-env": "7.22.9",
"@babel/preset-react": "7.22.5",
"@babel/helper-compilation-targets": "7.22.9"
} Edit: Set |
the @babel/preset-react latest version is 7.22.5, I tried to follow you advice, also tried to install 7.22.9 on all, but got prompt that the latest known release for preset-env is 7.22.5, probably due to this ongoing issue with npm registry: (got this:
) I tried to follow this commit from mui - and my (temp) workaround is to update .browserslistrc: |
Okay, I think the problem is that a newer babel package is matching You can see what version(s) you have installed with:
In your resolutions/overrides, try: // npm/pnpm
"overrides": {
"@babel/helper-compilation-targets": "7.22.9"
}
// yarn
"resolutions": {
"@babel/helper-compilation-targets": "7.22.9"
} |
Thanks! that works |
Cool, we'll bump the versions on our end since the latest patch seems to be misaligned depending on how package managers resolve them. |
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
web dev server not working after updating to NX 16.5.2 (or 16.5.0)
I see this error message while building:
ERROR in ./src/polyfills.ts
Module build failed (from ../../node_modules/@nx/webpack/src/utils/web-babel-loader.js):
Error: [BABEL] E:\github\nx-ui-ligo\apps\risk\src\polyfills.ts: @babel/helper-compilation-targets: 'opera_mobile' is not a valid target
and a blank page with this:
Cannot GET /
Expected Behavior
dev server working
GitHub Repo
No response
Steps to Reproduce
Nx Report
Failure Logs
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: