NODE_ENV=production npm run build failed

You can try with the cross-env option, sorry I don’t use Windows on a regular basis.

The best solution would probably be to add a package.json script like:

"build:prod": "cross-env NODE_ENV=production yarn build --clean",