-
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
Conflicting values for 'process.env.NODE_ENV' ("'development'" !== "\"development\"") #28040
Closed
1 of 4 tasks
Closed
1 of 4 tasks
Labels
Comments
Port issue seems to be the same as: nrwl/nx-labs#422 Once #27969 gets merged, I'll open a PR for it in this main |
This was referenced Oct 2, 2024
PRs are up! |
Much thanks @samtsai 🙏 |
Coly010
pushed a commit
that referenced
this issue
Oct 16, 2024
<!-- 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 --> Port is not respected from `rspack.config.[jt]s` and needs to be explicitly set in `project.json` options. ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> Port should be configurable via config, options, etc. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #28040 (port portion)
jaysoo
pushed a commit
that referenced
this issue
Oct 17, 2024
<!-- 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 --> ``` [webpack-dev-server] WARNING ⚠ DefinePlugin: │ Conflicting values for 'process.env.NODE_ENV' ("'development'" !== "\"development\"") ``` ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> `process.env.NODE_ENV` should resolve to `'development'` and not a quoted value: `"'development'"` ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #28040 (NODE_ENV part)
jaysoo
pushed a commit
that referenced
this issue
Oct 17, 2024
<!-- 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 --> Port is not respected from `rspack.config.[jt]s` and needs to be explicitly set in `project.json` options. ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> Port should be configurable via config, options, etc. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #28040 (port portion)
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Current Behavior
NODE_ENV problem:
Initializing a new nx repo (with rspack) using
npx create-nx-workspace@latest nxwarningdemo --preset=@nx/rspack --package-manager=yarn
leads to a warning in the browser console upon runningyarn start
dev server port configuration problem
Additionally, this may be a separate issue but the port the dev server runs on is unclear:
In reality localhost:4200 seems to be unused, wherease the dev server is actually running on localhost:8080
If I update rspack.config.js as shown:
the output and port the dev server is running on doesn't change, the rspack dev-server port setting is not respected.
If I update project.json as shown:
the output then becomes consistent with the same port listed on both lines and actually runs on the desired port (9999 in this case)
Expected Behavior
no warning related to
'process.env.NODE_ENV
why does this bother me? Because on another repo, this warning is very disruptive to starting the dev server as it shows up in a pop-up immediately on page load:
also the
config.devServer.port
field in rspack.config.js should be respected, and port 4200 shouldn't be listed in theyarn start
output (I think, this is unclear to me at least why that port is listed).GitHub Repo
https://github.com/dangbert/nxwarningdemo
Steps to Reproduce
then visit localhost:8080 and check the browser console logs
Alternatively you can
npx create-nx-workspace@latest nxwarningdemo --preset=@nx/rspack --package-manager=yarn
instead of cloning my repo (which was created on Sept 22, 204 using the above command)Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
I will make a separate issue for the port configuration problem if desired, let me know
The text was updated successfully, but these errors were encountered: