The term 'NODE_ENV=production' is not recognized as the name of a cmdlet
The term 'NODE_ENV=production' is not recognized as the name of a cmdlet
The term 'NODE_ENV=production' is not recognized as the name of a cmdlet

张家俊
2024年06月29日
|
浏览 95
这个问题通常出现在使用 npm scripts 时。要解决这个问题,需要确保你的系统上已经安装了 Node.js,并且在命令行环境中可以识别 npm 命令。然后,尝试在命令行中执行 SET "NODE_ENV=production"
(Windows)或 export NODE_ENV=production
(Mac/Linux)来设置环境变量。最后再次运行你的 npm 脚本,应该就可以识别 NODE_ENV=production
了。
我要提问
复制内容
分享给好友
AI编程问答网 免责声明:
以上内容除特别注明外均来源于网友提问,AI编程问答网回答,权益归原著者所有;
上一篇:命令行获取node_dev