Cannot activate workflow after upgrading N8N version

Cannot activate workflow after upgrade

I upgraded my local N8N instance from 1.53.2 to 1.91.3 and one of my workflows started showing an error that it was active but with an error. When I flipped the active switch off and back on I got an error message.

What is the error message (if any)?

Package subpath './format/index.js' is not defined by "exports" in path/to/project/node_modules/.pnpm/[email protected][email protected]/node_modules/date-fns/package.json
400 Package subpath './format/index.js' is not defined by "exports" in path/to/project/node_modules/.pnpm/[email protected][email protected]/node_modules/date-fns/package.json

Please share your workflow

Can’t share my workflow openly.

Share the output returned by the last node

The error doesn’t show during execution. It happens trying to activate a node.

Information on your n8n setup

  • n8n version: 1.91.3
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): whatever is the default.
  • Running n8n via (Docker, npm, n8n cloud, desktop app): pnpm
  • Operating system: MacOS

Hey @mig82

This looks like it’s down to how your local setup is resolving dependencies after the upgrade.

From your error:

Package subpath './format/index.js' is not defined by "exports" in /Users/x/n8n/node_modules/.pnpm/[email protected][email protected]/node_modules/date-fns/package.json

It shows that after upgrading your local n8n project using pnpm, your workspace is now pulling [email protected] at the root, which is leaking down into [email protected] used by nodes like ts-ics (probably your iCal or calendar node).

This happens because [email protected] expects [email protected], but now it’s getting served 3.6.0 due to the way pnpm flattens deps — and [email protected] no longer allows the deep imports (./format/index.js) that older packages rely on.


How to confirm

Run inside your local project root:

pnpm list date-fns

You’ll most likely see:

[email protected]

What you can do to fix (short-term workaround)

Try forcing [email protected] inside your local workspace:

pnpm add [email protected]

Or add an override in your package.json:

"pnpm": {
  "overrides": {
    "date-fns": "2.30.0"
  }
}

But this is more of a workaround and might cause other issues depending on your nodes.

Best recommendation

Honestly, I’d suggest using n8n via Docker if you can.
Keeps your environment clean and isolated, and avoids these kinds of local workspace conflicts entirely.
You won’t have pnpm hoisting packages into places they shouldn’t be.

My Docker instance on the same version you upgraded to shows:

~ $ npm list -g date-fns
/usr/local/lib
`-- [email protected]
  `-- [email protected]
    `-- [email protected]
      +-- [email protected]
      | `-- [email protected] deduped
      `-- [email protected]

Hope this helps,

Samuel

1 Like

Thank you Samuel.

You pointed me in the right direction. I did find that [email protected] is meant to work with [email protected] and not with 3.x, which I also checked doesn’t export subpath ./format/index.js

I’m not sure why pnpm was failing to ensure that this peer dependency was met, so I looked up how to override and found that I can do it by adding this to package.json:

  "pnpm": {
    "overrides": {
      "[email protected]>date-fns": "2.30.0"
    }
  }

But then, as fate would have it, I just decided to try deleting node_modules and pnpm-lock.yaml and reinstalling one last time. I swear I don’t know why, but this time the right peer dependency got installed, and I had not yet added the override.

An obscure one for sure.

P.S.: I hear you. I should move to Docker. I’d need to figure out how to port my existing workflows and credentials to a fresh Docker installation. Maybe later on.

1 Like

Amazing glad you got :slight_smile: am trying to learn how to make community node, not finding much info on it atm. :slight_smile: hoping to build some.

I am experiencing something similar, my workflow broke after upgrading to the lates stable version of n8n. Funny enough I can execute the workflow but it only does the 1st 2 nodes then stops and says “workflow executed Successfully”. I am running the Cloud version of n8n. Any ideas on how to fix this? Much appreciated.

I’m afraid I’ve never run into that particular problem before.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.