【发布时间】:2020-08-11 16:42:04
【问题描述】:
根据链接 (https://technopy.com/deploying-a-flask-application-in-production-nginx-gunicorn-and-pm2-html-2/),我按照所有步骤配置 pm2 设置,但服务器也没有启动。 以下是遇到的消息截图。
一旦我输入命令 pm2 list 就没有进程启动。
错误信息是:
2018-07-23T07:23:29.818Z] PM2 log: ===============================================================================
[2018-07-23T07:23:29.818Z] PM2 error: [PM2] Resurrecting PM2
Be sure to have the latest version by doing npm install pm2@latest -g before doing this procedure.
[PM2] Saving current process list...
/usr/local/lib/node_modules/pm2/node_modules/pidusage/lib/procfile.js:26
buf = Buffer.alloc(SIZE)
^
TypeError: Buffer.alloc is not a function
at readUntilEnd (/usr/local/lib/node_modules/pm2/node_modules/pidusage/lib/procfile.js:26:18)
at /usr/local/lib/node_modules/pm2/node_modules/pidusage/lib/procfile.js:67:5
at FSReqWrap.oncomplete (fs.js:82:15)
请提出前进的方向
我试过 pm2 kill 还是不行
仅供参考:
nodejs 版本:4.2.6
pm2 3.0.0
npm 6.1.0
【问题讨论】: