Skip to content

Incompatibility with latest n8n – API/Worker Mismatch with Tesseract Node #5

@masterkey2000

Description

@masterkey2000

I am trying to use n8n-nodes-tesseractjs with the Self-hosted AI Starter Kit on Windows 11 (Ubuntu Terminal) using Docker with an Nvidia GPU.

Setup:

n8n: latest (Docker, Self-hosted AI Starter Kit)

Community Node: n8n-nodes-tesseractjs

OS: Windows 11, Ubuntu Terminal

Docker: Compose, GPU profile enabled

Additional components: Ollama, Qdrant, PostgreSQL

Problem:
When trying to install the community node via the UI, I get the following error:

Error installing new package Error loading package "n8n-nodes-tesseractjs": The specified package could not be loaded Cause: require() of ES Module /home/node/.n8n/nodes/node_modules/pdfjs-dist/legacy/build/pdf.mjs not supported. Instead change the require of /home/node/.n8n/nodes/node_modules/pdfjs-dist/legacy/build/pdf.mjs to a dynamic import() which is available in all CommonJS modules.

If I try to use older n8n versions (1.68.0, which the node documentation says it was tested against), I immediately get warnings that I should upgrade.

Additional Details:

The node also triggers an API/Worker mismatch, because modern n8n versions (latest) and the node expect different versions of Tesseract / PDF.js.

Manual installation of packages inside the container also fails (npm install tesseract.js@... tesseract.js-core@...), since some versions do not exist.

The issue seems to stem from a combination of the community node, PDF.js ESM modules, and the current n8n architecture (CommonJS vs ESM).

Expected Behavior:

The node should install successfully on current n8n versions, without API/Worker mismatches or ES module errors.

Alternatively, the documentation should clearly specify which n8n versions are officially supported.

Steps to Reproduce:

Clone the Self-hosted AI Starter Kit and configure .env

Run Docker Compose (latest n8n version)

Open http://localhost:5678 in the browser and try to install the community node

Error appears immediately

Questions / Feature Request:

Are there plans to update the node to support the latest n8n versions?

Are there any workarounds for the ES module issue and the API/Worker mismatch?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions