Skip to content

Build error when NODE_ENV=production #18663

Discussion options

You must be logged in to vote

If you set NODE_ENV=production before npm install, npm does not install devDependencies.
https://docs.npmjs.com/cli/v8/commands/npm-install#:~:text=With%20the%20%2D%2Dproduction,production%3Dfalse.

Vite sets NODE_ENV=production in build when NODE_ENV is not set, so probably you don't need to set it manually.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mykhailo-monchak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants