URGENT: Update broke n8n

Hello,

I wanted to update N8N to the new version (I was 2 months and 10 versions behind)
and apparently it has broken my entire n8n

How do i fix this:

/root/.pm2/logs/n8n-error.log last 15 lines:
1|n8n | ‘/usr/lib/node_modules/n8n/dist/src/WorkflowRunnerProcess.js’
1|n8n | ]
1|n8n | }
1|n8n | node:internal/modules/cjs/loader:936
1|n8n | throw err;
1|n8n | ^
1|n8n |
1|n8n | Error: Cannot find module ‘/usr/lib/node_modules/n8n/dist/src/WorkflowRunnerProcess.js’
1|n8n | at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
1|n8n | at Function.Module._load (node:internal/modules/cjs/loader:778:27)
1|n8n | at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
1|n8n | at node:internal/main/run_main_module:17:47 {
1|n8n | code: ‘MODULE_NOT_FOUND’,
1|n8n | requireStack:
1|n8n | }

/root/.pm2/logs/n8n-out.log last 15 lines:
1|n8n | “2027233717InProgress","1024816680Resolved","1024466758Hold","1024466758InProgress","1024466758Created","1023386577Created","1023976619RCreated","1023976619InProgress","1024096567Hold","1024096567InProgress","1026266583Resolved","1024366659Created","1024816680InProgress","1025506589Created","2026223873Resolved","1026986495Hold","2024333854Resolved","1023806607Hold","2020753793Created","1025016698Resolved","1025016698InProgress","1026715467Canceled","1023165885Created","1029956140Created","1023625907Created","1025835987Created","1028566306Created","1028076734Hold","1026027616563Hold","1027046740Resolved","1020686458Resolved","2024333854Created","1021636742Resolved","1026186580Resolved","1026606564Resolved","1022406699Created","1028506617Hold","1029396340Created","1023546613Created","2020233907Resolved","2023003851Resolved","1028486755Resolved","1023416882Cred","1026166660Hold","1029266648Hold","1020546770Created","1024816680Hold","1022276612InProgress","2020513884Resolved","2023353774Resolved","1029956658Created","1023816650Resolved","1022756689Resolved","1029046664Resolved","1028116640Created","1025236646Created","1022696551Resolved","10286566698Created","1022906338Hold","2028783771Resolved","2024783813Resolved","2027233717Created","2026113851Resolved","1023806607InProgress","1026266583Cold","1022636706Created","2028263943Created","1023976619Created"]}},"shared":[{"createdAt":"2022-04-01T22:57:03.630Z","updatedAt":"2022-04-01T22:{"id":"db9bc8f3-8367-483a-8ba5-544b15b17e12","e”,"resetPasswordToken":null,"resetPasswordTokenExpiration":null,"personalizationAnswers":{"codingSkill":"2","companyTyptionGoal":"operations","companySize":"personalUser","version":"v2"},"createdAt":"2022-04-01T22:13:01.603Z","updatedAt":"2022-04-01T22:56:45.000id":1,"name":"owner","scope":"global","createdAt":"2022-04-01T22:13:01.587Z","updatedAt":"2022-04-01T22:13:01.587Z"},"isPending":false},"user83a-8ba5-544b15b17e12","workflowId":23}]}",“263896”]
1|n8n | execution time: 1946
1|n8n | query is slow: SELECT “ExecutionEntity”.“id” AS “ExecutionEntity_id”, “ExecutionEntity”.“waitTill” AS “ExecutionEntity_waitTill” FROM "execution_ent WHERE “ExecutionEntity”.“waitTill” <= ? ORDER BY “ExecutionEntity”.“waitTill” ASC – PARAMETERS: [“2022-06-10 17:46:51.672”]
1|n8n | execution time: 31425
1|n8n | Migrations in progress, please do NOT stop the process.

When creating topics, esp. topics like this, make please sure to properly fill the template (instead of simply deleting it). Else we will not be able to help you and will end up asking for exactly the same information which the template did, like in this case:

Information on your n8n setup

  • n8n version:
  • Database you’re using (default: SQLite):
  • Running n8n with the execution process [own(default), main]:
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]:
  • n8n version: Latest version, Dont know the version number
  • Database you’re using (default: SQLite): SQLite
  • Running n8n with the execution process [own(default), main]: own
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: npm

But it seems like it’s still working on the migration but that error message does worry me

Very strange. Did you install n8n via npm install n8n or do you have the GitHub repository checked out and you build it from the source?

I used npm update -g n8n as stated here: npm - n8n Documentation

It sounds to me like something went wrong with the update. Probably best to totally uninstall n8n and then reinstall it.

Right now i’m first gonna let the Database migration process finish so the database is atleast intact

Ah, it is still running. Yes, that is for sure the right thing to do!

Okay, So it looks like it was caused by the database migration which took ~4,5 hours

But it’s solved now, phew

1 Like

Great to hear!

If it took 4.5h to run I assume it is time to clean it up a little bit :wink:

1 Like