I'm developing a simple backend project with Node.js (v12.16.1) on Windows 10.
My package.json file contains the following command:
"scripts": {
"start": "NODE_ENV=production node --experimental-modules --require dotenv/config server.mjs dotenv_config_path=config/config.env",
...
}
And when I type npm run start, I get
> NODE_ENV=production node --experimental-modules --require dotenv/config server.mjs dotenv_config_path=config/config.env
'NODE_ENV' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! devcamper-api@1.0.0 start: `NODE_ENV=production node --experimental-modules --require dotenv/config server.mjs dotenv_config_path=config/config.env`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the devcamper-api@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Why does this failure occure?