Use nuxt+pm2 to report an error.

deploy the nuxt project on Aliyun"s server
execute pm2 start npm-- name "nuxt-demo"-- run start command
you can see that it is online
but immediately the pm2 list view process shows errored
View error log shows Created by npm, please don"t edit manually.
but I can run normally directly npm run start.
ask what"s going on here.

Jun.27,2022

similar questions have been raised by issue. Please make good use of search before asking questions.

Eg
npm install node-cmd --save;

in startscript.js:
var cmd=require('node-cmd'); cmd.run('npm start');

pm2 start startscript.js

PM2 is unable to run server.js

Menu