Can't initialize n8n after update

I’m using pm2 to run n8n. I just upgraded n8n and reloaded the process, but it got stuck in a restart loop.

I checked the logs, and I’m just seeing an endless repeat of these lines:

Right after “Initializing n8n process”, we get “Error: Exiting due to an error” and then “TypeError: the “streams” argument must be specified”.

Can you help me figure out what’s wrong?

Hi @Giovanni_Segar, I am afraid I have not seen this error message before. Could it possibly come from the community node you are using?

If not, can you confirm how exactly to reproduce your problem so I can take a closer look?

It’s possible that it’s due to the community node, but I’m not certain. Is there a way to remove a community node without having access to n8n? I don’t need it, and if that’s causing the issue I can just remove it.

I can’t really describe how to reproduce the issue because it’s specific to my setup. To give as much detail as possible:

I’m running this on a DigitalOcean droplet. I had a developer do the legwork, and he set up something called pm2. I use pm2 reload ecosystem.config.js to start n8n. That config file has the environment variables that are usually in the docker-compose.yml file:

module.exports = {
  apps: [
      name: "",
      script: "n8n",
      watch: false,
      env: {
        "EXECUTIONS_DATA_PRUNE": true,
        "N8N_BASIC_AUTH_ACTIVE": true,
        "N8N_HOST": 'localhost',
        "N8N_PORT": '5678',
        "N8N_PROTOCOL": 'http',
        "NODE_ENV": 'production',
        "EXECUTIONS_DATA_PRUNE": true,
        "N8N_LOG_LEVEL": "debug",
        "N8N_DIAGNOSTICS_ENABLED": false,
        "WEBHOOK_TUNNEL_URL": '',
        "VUE_APP_URL_BASE_API": ''
      autorestart: true

This was all working perfectly. The only thing that changed: I stopped the pm2 process, ran an update on n8n:

npm install -g n8n

I saw several warnings/errors related to this, so I also updated npm.

Then I ran pm2 reload ecosystem.config.js which successfully started the app. I noticed it was restarting every 15 seconds or so in a loop, so I added the debug logging so I could see details of what’s going on.

If you let me know how to remove the community node without being able to start n8n, I’ll definitely give that a shot.

FYI, tried added the env variable N8N_EXCLUDE for n8n-nodes-puppeteer.Puppeteer and it didn’t work.

Hey @Giovanni_Segar,

If you go to your user folder there should be a .n8n/nodes folder in there you might be able to find the node.

I am not sure that the node is the issue though, have you got in touch with the person who set it up to find out if they set up anything else?

@Jon At this point I need to get this back up and running, and I’d rather set it up via the recommended n8n method with docker-compose and caddy.

I successfully exported all workflows into a json file—is there a way to import all the workflows into a new n8n instance? Or do I need to do it one at a time?

1 Like

Ok, I wasn’t able to figure out what was wrong. I ended up creating a new droplet, installing via docker caddy as the official documentation recommends, and exporting all my workflows/credentials and importing them here. I’m terrible at this linux terminal stuff but I made it :smiley: