v2.12.1
windows 10
node v12.16.0
pm2 v4.4.0
pm2 start npm -- start
running application
[PM2] Starting C:\PROGRAM FILES\NODEJS\NPM.CMD in fork_mode (1 instance)
[PM2] Done.
[PM2][ERROR] Script not found: D:\site.locclient\start
Actually same issue I just had
pm2 work with nuxtjs, from my project I add this in package.json script,
"start": "export `cat env/.prod-env` && nuxt start",
"ypm2": "pm2 start --name 'web' 'yarn start' ",
pm2 start --name 'web' '${or your start script}'
I solved it like this
npm i nuxt-start
ecosystem.config.js
module.exports =
{
apps:
[
{
name: "client",
script: "node_modules/nuxt-start/bin/nuxt-start.js",
cwd: "/home/site/client",
args: "start -p 80 -H 0.0.0.0"
}
]
}
pm2 start ecosystem.config.js
Most helpful comment
I solved it like this
npm i nuxt-startecosystem.config.js
pm2 start ecosystem.config.js