“NODE_ENV” is not recognized as an internal or external command

来源:互联网 发布:淘宝女人秋装 编辑:程序博客网 时间:2024/06/04 01:37

运行nodejs程序时出现NODE_ENV不是内部或外部命令,也不是可运行的程序,或者批处理文件

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

初始脚本:

 "scripts": {        "start": "NODE_ENV=production PORT=3333cs pm2 start dist/index.js",      }

解决办法:在NODE_ENV前面添加 set ,这样问题就被解决了

"scripts": {        "start": "set NODE_ENV=production PORT=3333cs pm2 start dist/index.js",      }


阅读全文
0 0
原创粉丝点击