Install the cross-env package

npm install --save-dev cross-env

use in a npm script:

cross-env NODE_ENV=development node start

References:

  • https://stackoverflow.com/questions/11928013/node-env-is-not-recognized-as-an-internal-or-external-command-operable-comman