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

后端 未结 16 1583
清歌不尽
清歌不尽 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条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-29 16:00

    For windows you can do it like

    "scripts": {
        "start:prod" : "SET NODE_ENV=production & nodemon app.js",
        "start:dev" : "SET NODE_ENV=development & nodemon app.js"
    },
    

提交回复
热议问题