You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to serve a production version of my react app, I always get the warning about conflicting NODE_ENV values. This only happens with serve. Building the app works as expected for both dev and prod modes.
To make sure that it is not some configuration issue in my repo I created a fresh workspace with nx 14.1.4 and it is totally reproducible. The build is always running in development mode.
Expected Behavior
When I run serve in prod mode, the app should be built in prod mode.
Steps to Reproduce
Create a new workspace and try to serve the app in prod mode.
npx create-nx-workspace@latest test --preset=react --appName=demo
# Then serve
nx serve demo --prod
Failure Logs
WARNING in DefinePlugin
Conflicting values for 'process.env.NODE_ENV'
Environment
Node : 16.15.0
OS : darwin arm64
npm : 8.5.5
nx : 14.1.4
@nrwl/angular : Not Found
@nrwl/cypress : 14.1.4
@nrwl/detox : Not Found
@nrwl/devkit : 14.1.4
@nrwl/eslint-plugin-nx : 14.1.4
@nrwl/express : Not Found
@nrwl/jest : 14.1.4
@nrwl/js : 14.1.4
@nrwl/linter : 14.1.4
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/nx-cloud : Not Found
@nrwl/nx-plugin : Not Found
@nrwl/react : 14.1.4
@nrwl/react-native : Not Found
@nrwl/schematics : Not Found
@nrwl/storybook : 14.1.4
@nrwl/web : 14.1.4
@nrwl/workspace : 14.1.4
typescript : 4.6.4
rxjs : 6.6.7
---------------------------------------
Community plugins:
The text was updated successfully, but these errors were encountered:
Current Behavior
When trying to serve a production version of my react app, I always get the warning about conflicting NODE_ENV values. This only happens with serve. Building the app works as expected for both dev and prod modes.
To make sure that it is not some configuration issue in my repo I created a fresh workspace with nx 14.1.4 and it is totally reproducible. The build is always running in development mode.
Expected Behavior
When I run serve in prod mode, the app should be built in prod mode.
Steps to Reproduce
Create a new workspace and try to serve the app in prod mode.
Failure Logs
Environment
The text was updated successfully, but these errors were encountered: