Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

“NODE_ENV” is not recognized as an internal or external command, operable command or batch file

I'm trying to setup an environment. However, I'm getting the following error every time:

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

When I added the set before NODE_ENV it showed me only this:

set NODE_ENV=development nodemon -w src --exec "babel-node src --presets es2015,stage-0"
like image 745
TikTak Avatar asked Apr 26 '26 16:04

TikTak


1 Answers

In package.json please add below line and try,

"build": "SET NODE_ENV=production webpack"

If no luck then add below dependency,

"npm i cross-env"

and in package.json,

"start": "cross-env NODE_ENV=development node server.dev.js", "serve": "cross-env NODE_ENV=production node server.prod.js"
like image 168
Vijayanath Viswanathan Avatar answered Apr 29 '26 06:04

Vijayanath Viswanathan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!