NODE_ENV=production npm run build failed

npm install cross-env

Add the following in package.json scripts section:
"production": "cross-env NODE_ENV=production npm run build"

Run the command
npm run production

1 Like