I'm on Windows 10, but I'm using git bash
. When running from git bash
the following:
DEBUG=foo node index.js
it works fine and sets the environment variable DEBUG
. But if I put it into the scripts
section of the package.json
:
"scripts": {
"start": "DEBUG=foo node index.js"
},
and run the following from git bash
I get the following error:
$ npm start
> nodejs@1.0.0 start C:\Users\maksym.koretskyi\Desktop\nodejs
> DEBUG=foo node index.js
'DEBUG' is not recognized as an internal or external command,
operable program or batch file.
Why the behaviour?