javascript - 'NODE_ENV' is not recognized as an internal or external command -


i have app working on linux when execute on windows error.

'node_env' not recognized internal or external command, operable program or batch file.  'node_env' not recognized internal or external command,operable program or batch file.  npm  err! code elifecycle npm err! errno 1 npm err! aaa@1.0.0 webpack-watch: `node_env='debug' webpack --progress -d -colors --watch` npm err! exit status 1 npm err! 

i have tried in cmd.

set node_env=debug 

which found here “node_env” not recognized internal or external command

and here snippet of code package.json guess mistake.

"webpack-watch": "node_env='debug' webpack --progress -d --colors --watch", "server-watch": "node_env='debug' nodemon backend/server.js" 

windows doesn't understand syntax var=value cmd1 arg1. need adapt npm run tasks use windows' syntax:

"webpack-watch-win": "set node_env=debug & webpack ..." "server-watch-win": "set node_env=debug & nodemon ..." 

....but there more errors hit downstream. should @ least past environment variable declaration, though. node rooted in *nix shells, not cmd.exe.


Comments

Popular posts from this blog

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -