Today I Learned - Rocky Kev

TIL what to do if you're a Win User getting NODE_ENV errors

POSTED ON:

TAGS:

The life of a windows developer.

'NODE_ENV' is not recognized as an internal or external command, operable program or batch file.

If you got this error, it's often because the repo you got has a package.json file that contains something like this.

"scripts": {
"build": "NODE_ENV=production babel src --out-dir dist"
}

You can use this global package.

npm install -g win-node-env

RESOURCES:
Package: https://www.npmjs.com/package/win-node-env

SO Link: https://stackoverflow.com/a/64608575/4096078


Related TILs

Tagged:

TIL about some neat notepad tricks

'F5' generates a timestamp in notepad. And adding a timestamp using .LOG on the 1st line of a text file.

TIL that Windows 10 has code all the way back to Windows 3.x

This dev digs real deep to see how far Windows has been re-using UI elements.

TIL what to do if you're a Win User getting NODE_ENV errors

Setting NODE_ENV=production before command babel doesn't work on Windows.