Exotic dependency "xlsx" when installing n8n from pnpm

Describe the problem/error/question

I was originally on n8n@2.13.4, tried to upgrade to latest with “pnpm install n8n”. I deleted node_modules and reinstalled everything from scratch but the same issue occurs.

What is the error message (if any)?

[ERR_PNPM_EXOTIC_SUBDEP] Exotic dependency “xlsx” (resolved via url) is not allowed in subdependencies when blockExoticSubdeps is enabled

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 2.22.0
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • Operating system: Debian 13.5

good morning @Mathis!
Why didn’t you use the documented method with npm or Docker?
If you really can only use pnpm, you have to disable the subdependency lock in pnpm or in the workspace. Currently they all come as true.

Thanks for your reply.

I switched to pnpm months ago and updated multiple times without any issue so far.

As you suggested i reinstalled n8n with npm and it just works.

I don’t know why pnpm broke n8n.

Happy to hear it! @Mathis
Please mark the answer as a solution so that community members can find solutions more easily.