-
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
Angular dev-server (NX) builder, not usable with NX 18 and Angular < 16 #22590
Comments
esbuild was introduced in angular 16 and the flag you're trying to use in 16.1, there's nothing NX can do about that. Upgrade your angular version. You should always upgrade nx with Here's the version matrix: https://nx.dev/nx-api/angular/documents/angular-nx-version-matrix |
As it is in our project we can't migrate the angular version as of right now. We don't want to use esBuild for our dev-server, but it's impossible to use the dev-server even with Can't the default value of forceEsbuild be undefined, so that nx is compatible angular versions <16? Thank you for sharing the compatibility matrix! |
What happens if you do not specify forceEsbuild in your conf at all? |
The same error |
Note: manually remove the following line from node_modules, successfully serves the app. Not sure if it breaks using NX with higher versions of angular |
@AronHoxha there's a legit issue for which I created a PR, but note that Angular versions lower than 15 are not supported. From the failure logs you shared, you seem to be using Angular 13.3.11, which is not a supported version. |
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
Currently you are using an app with NX 18 angular < 16, the dev-server builder of @nx/angular is unusable since the command fails with the following error:
Expected Behavior
The dev server should start
GitHub Repo
No response
Steps to Reproduce
The command should fail with the above mentioned error
Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
In the code, forceEsbuild is checked to be undefined for angular versions < 16:
nx/packages/angular/src/builders/dev-server/lib/validate-options.ts
Line 10 in ef81455
But forceEsbuild is set to false by default in the builder schema:
nx/packages/angular/src/builders/dev-server/schema.json
Line 117 in ef81455
This change seems to have been made in this PR: #21753
The text was updated successfully, but these errors were encountered: