=> ERROR [javascript-runner-builder 2/10] COPY ./dist/task-runner-javascript /app/task-runner-javascript 0.0s
...
ERROR: failed to build: failed to solve: failed to compute cache key: failed to calculate checksum of ref 541ed8ae-efc1-4cc9-818e-37be482f2116::j4d4wtpi1bezx7g44056xw077: "/dist/task-runner-javascript": not found
This was because there is not dist folder and thus no ./dist/task-runner-javascript/package.json. I fixed this issue by adding a dummy file.
But when I create a workflow and add a “code” node, and try to import the pypdf package:
from pypdf import PdfReader
I get the error message
ModuleNotFoundError: No module named 'pypdf'
Even if I go into the container’s terminal and run python, the package cannot be imported there either. I would like to also add that I can confirm the pypdf was added to the extras.txt file and it did end up in the task runner image. I confirmed this by going into the container’s terminal and:
$ cat /opt/runners/task-runner-python/extras.txt
# Runtime-only extra Requirements File for installing dependencies in the Python task runner image.
# Installed at Docker image build time. Allow usage in the Code node
# via 'N8N_RUNNERS_EXTERNAL_ALLOW' env variable on n8n-task-runners.json.
# numpy==2.3.2
pypdf
But the package is no where to find. Has anyone managed to add a python package to the task runner?