-
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
esbuild version conflict in NX Angular project when running in production mode #27333
Comments
Thanks for reporting this! The issue comes from the I'm closing this since it's not actionable by us. |
Well, the problem only occurs in an nx wokspace! (I tried it with an angular only repository) Because If I don't install |
Do you need |
I never thought to move it to devDependecies since it is the nx default to put it into dependencies. I just tried that solution and it works! Maybe it would be a good idea to put it into devDependencies by default? Or split |
I'm glad it worked. I agree we should consider generating projects with it in Moving the runtime helpers out of |
Thank you for your help! |
Sorry, I should probably leave this open, right? |
…endencies when using runtime helpers (#27405) <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> New workspaces are generated with `@nx/angular` as a production dependency even though the generated code does not use any runtime helper from it. ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> New workspaces should be generated with `@nx/angular` as a development dependency. When generating a new MF host or dynamic MF application (host or remote), the `@nx/angular` package should be moved to the production dependencies because the generated code uses some runtime helpers from it. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #27333 (cherry picked from commit 1ae3c2d)
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
There seems to be a version conflict issue with esbuild while trying to run the project in a production environment. When I try to execute
NODE_ENV=production npm ci
in a Docker container, I getError: Expected "0.23.0" but got "0.21.5"
, referring to esbuild.Expected Behavior
The project should run successfully after executing
NODE_ENV=production npm ci
.GitHub Repo
https://github.com/joh-klein/nx-examples
Steps to Reproduce
npx create-nx-workspace@latest test1
.npx nx generate @nrwl/angular:lib --buildable
.NODE_ENV=production npm ci
.Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
A temporary workaround is to add this override to the package.json
The text was updated successfully, but these errors were encountered: