shida
shida copied to clipboard
启动server失败,xvfb-run: error: Xvfb failed to start
- 启动命令:
xvfb-run -s '-ac -screen 0 1280x1024x24' nodemon server/app.js dev -L - 报错信息:
~/workspace/H5/shida$ npm run dev-server
Debugger listening on ws://127.0.0.1:53787/d8ef2411-675d-4e38-b46a-42e243d35039
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
> [email protected] dev-server /home/chenjm/workspace/H5/shida
> xvfb-run -s '-ac -screen 0 1280x1024x24' nodemon server/app.js dev -L
xvfb-run: error: Xvfb failed to start
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev-server: `xvfb-run -s '-ac -screen 0 1280x1024x24' nodemon server/app.js dev -L`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev-server script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/admin/.npm/_logs/2023-06-07T03_05_00_835Z-debug.log
Waiting for the debugger to disconnect...
- 启动失败后,尝试使用
pm2 start -f server/app.js,就可以启动了。不知道为什么xvfb-run -s '-ac -screen 0 1280x1024x24' nodemon server/app.js dev -L启动不了了,昨天还可以启动的。
~/workspace/H5/shida$ pm2 start -f server/app.js
Debugger listening on ws://127.0.0.1:53372/32caf6df-fa33-4ced-9e57-b1d5660f73fc
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
[PM2] Applying action restartProcessId on app [app](ids: 0,1)
[PM2] [app](0) ✓
[PM2] [app](1) ✓
[PM2] Process successfully started
┌────┬────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├────┼────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ app │ default │ 0.1.0 │ fork │ 937890 │ 0s │ 0 │ online │ 0% │ 20.5mb │ admin │ disabled │
│ 1 │ app │ default │ 0.1.0 │ fork │ 937896 │ 0s │ 136 │ online │ 0% │ 20.3mb │ admin │ disabled │
└────┴────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
[PM2][WARN] Current process list is not synchronized with saved list. Type 'pm2 save' to synchronize.
Waiting for the debugger to disconnect...
https://tnfe.github.io/FFCreator/#/qa/qa