I am just trying to understand the delta between the setup of my last windows laptop and my new one.
Notes:
- OLD runs windows 10, NEW runs windows 11.
- using git bash in both.
- WSL enabled in features in both (not sure if this matters at all).
- nvm controls node version in both.
- running an npm script defined as:
NODE_ENV=production gulp build
. - no
cross-env
,win-node-env
or similar packages installed on old one, globally or in the project. - nothing in the windows PATH environment variable on either that would seem to affect this.
OLD works fine, NEW gives the error:
'NODE_ENV' is not recognized as an internal or external command, operable program or batch file
.
Why would this happen on one and not the other? What else can I check? Happy to use cross-env and probably will, but I really just want to understand. Happy to provide any more details.