Hello, I am trying to start a project with frontity and dockers and make it work with PM2. In Fork mode there is no problem but in cluster mode there is no way to make it work, the process does not start. From what I have been able to investigate the error that PM2 returns occurs when trying to cluster binary files, since cluster mode only works with pure nodejs applications. Are there any limitations regarding cluster mode in frontity?
Thank you.
start command: pm2 start ecosystem.config.js --no-daemon
ecosystem.config.js:
module.exports = {
apps : [{
name: "prueba",
script: "npm run dev",
merge_logs: true,
max_restarts: 5,
instances: 2,
exec_mode: "cluster",
autorestart: true,
wait_ready: true,
automation: false,
max_memory_restart: "1G",
broadcast_logs: true,
env: {
NODE_ENV: "development",
},
env_production: {
NODE_ENV: "production",
}
}]
}
Error trace:
0| | ELF
0| | ^
0| | SyntaxError: Invalid or unexpected token
0| | at wrapSafe (internal/modules/cjs/loader.js:1054:16)
0| | at Module._compile (internal/modules/cjs/loader.js:1102:27)
0| | at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
0| | at Module.load (internal/modules/cjs/loader.js:986:32)
0| | at Function.Module._load (internal/modules/cjs/loader.js:879:14)
0| | at /usr/local/lib/node_modules/pm2/lib/ProcessContainer.js:303:25