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

后端 未结 16 1590
清歌不尽
清歌不尽 2020-11-29 15:33

I\'m trying to setup an environment for a Node.js app. but I\'m getting this error every time.

\"NODE_ENV\" is not recognized as an internal or extern

16条回答
  •  旧时难觅i
    2020-11-29 16:04

    It sounds like your error comes from an attempt to run something like this (which works in Linux)

    NODE_ENV=development node foo.js
    

    the equivalent in Windows would be

    SET NODE_ENV=development
    node foo.js
    

    running in the same command shell. You mentioned set NODE_ENV did not work, but wasn't clear how/when you executed it.

提交回复
热议问题