egg.js npm start 启动报错

开发环境运行项目即npm run dev的时候是正常的,但是npm start会启动失败,最可能的原因是因为npm start启动使用egg-scripts机制启动,对于运行中遇到error日志就会中断进程,方便发现问题,有时构建过程中的node warnning会认为是stderr被捕获到,所以npm start会构建中断,解决方案是忽略掉stderr中断机制,在原来命令基础上添加--ignore-stderr即可

egg-scripts start --port=7001 --daemon --title=egg-manage --ignore-stderr

  

posted @ 2018-10-06 11:44  杜培东  阅读(8633)  评论(0编辑  收藏  举报