Hızlı yanıt: kod örneği
I wrote a module for this: win-node-env. It creates a that sets the environment variable and spawns a child process with the rest of the command and its args.Just install it (globally), and run your npm script commands, it should automatically make them work.
NODE_ENV.cmd
NODE_ENV
npm install -g win-node-env