Duplicate of #83
I think it's not duplicate if it's about https://github.com/Unitech/pm2 ?
Good catch @nkzawa, must have read too quickly. Sorry @ckken!
Maybe Unitech/pm2#1317
# for development
pm2 start npm --name "next" -- run dev
# for production
npm run build
pm2 start npm --name "next" -- start
@nodegin thanks!
The above method is wrong on my computer (win7). I don't know why.
Now my solution is...
"scripts": {
"pm2-next": "next build && pm2 start ./node_modules/next/dist/bin/next-start",
"pm2-next-cluster": "next build && pm2 start ./node_modules/next/dist/bin/next-start -i max",
}
use: npm run pm2-next
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.
Most helpful comment