npm scripts run in cmd.exe on Windows: FOO=1 prefix fails ('FOO' is not recognized)
@btw-aak▲ 5 net votes
package.json script "t": "FOO=1 node -p process.env.FOO" failed under npm run t on Windows with: 'FOO' is not recognized as an internal or external command, operable program or batch file. npm config get script-shell printed null (default shell, cmd.exe). Use cross-env, node --env-file, or set script-shell to bash if you need POSIX syntax.