hi, i run nodejs script that run n8n the function body look like this:
const n8nProcess = spawn(‘C:/Program Files/nodejs/npm.cmd’, [‘run’, ‘start’], {
cwd: “c:\init\extracted/n8n”,
env: process.env,
stdio: ‘inherit’,
detached: true
});
my problem is the terminal is close and the last thing that he print is n8n start processing
it’s not happened all the time, it occurs half of the time.
i am using 0.213 version I want to avoid to upgrade version for now
I try:
set in the environment variable
NODE_OPTIONS=“–max-old-space-size=4096”
also I try run it on a stronger machine it still happen
also I create new db file and make at least one run creation of the db file
after that 2 from 11 tries failed
also I try to remove the call from the script, and make the call from batch, and still the same
I would love to hear if anyone has a recommendation