# Task runner issue with external module

**URL:** <https://community.n8n.io/t/task-runner-issue-with-external-module/90566>\
**Category:** Questions\
**Created:** [March 20, 2025, 9:23am UTC](https://community.n8n.io/t/task-runner-issue-with-external-module/90566 "2025-03-20T09:23:45Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kent1](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@Kent1](https://community.n8n.io/u/Kent1)\
**Post date:** [March 20, 2025, 9:23am UTC](https://community.n8n.io/t/task-runner-issue-with-external-module/90566/1 "2025-03-20T09:23:46Z")

</div>

## Describe the problem/error/question

I tried to activate task runner via env var “N8N\_RUNNERS\_ENABLED=true”. But when this task runner is activated I have the following error in my code node that use puppeteer

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/b/f/bfec82bcce6ddc5c3587acde9deef3c046057975.png)

For info, I update my Dockerfile to install puppeteer and the problems seems to come from this personal install

Stack trace

```auto
TypeError: Cannot assign to read only property 'constructor' of object 'Error' at Object.createErrorClass (/usr/local/lib/node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/third_party/rxjs/rxjs.js:238:38) at ../../node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js (/usr/local/lib/node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/third_party/rxjs/rxjs.js:252:55) at __require (/usr/local/lib/node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/third_party/rxjs/rxjs.js:209:50) at ../../node_modules/rxjs/dist/cjs/internal/Subscription.js (/usr/local/lib/node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/third_party/rxjs/rxjs.js:321:33) at__require (/usr/local/lib/node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/third_party/rxjs/rxjs.js:209:50) at ../../node_modules/rxjs/dist/cjs/internal/Subscriber.js (/usr/local/lib/node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/third_party/rxjs/rxjs.js:649:26) at __require (/usr/local/lib/node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/third_party/rxjs/rxjs.js:209:50) at ../../node_modules/rxjs/dist/cjs/internal/Observable.js (/usr/local/lib/node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/third_party/rxjs/rxjs.js:887:24) at__require (/usr/local/lib/node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/third_party/rxjs/rxjs.js:209:50) at ../../node_modules/rxjs/dist/cjs/index.js (/usr/local/lib/node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/third_party/rxjs/rxjs.js:8919:24)

```

When I remove env var N8N\_RUNNERS\_ENABLED=true my workflow works fine.

## Information on your n8n setup

- \*\*n8n version:\*\*1.83.2
- \*\*Database (default: SQLite):\*\*Postgres
- \*\*n8n EXECUTIONS\_PROCESS setting (default: own, main):\*\*default
- \*\*Running n8n via (Docker, npm, n8n cloud, desktop app):\*\*Docker
- \*\*Operating system:\*\*Redhat

---

<div class="post-metadata">

**Author:** ![Kent1](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@Kent1](https://community.n8n.io/u/Kent1)\
**Post date:** [March 20, 2025, 2:15pm UTC](https://community.n8n.io/t/task-runner-issue-with-external-module/90566/2 "2025-03-20T14:15:06Z")

</div>

I found a related topic but the problem seems to be solved with 1.83.0 but I use 1.83.2 and I still have the issue

> [@Enabling Task Runners Breaks Workflows](http://community.n8n.io/t/enabling-task-runners-breaks-workflows/83774):
>
> Hello I recently enabled task runners on my self hosted instance and lots of my code nodes that use custom npm packages installed in the docker container stopped working with constructor errors. I note the warning says task runners will be enabled by default soon, so with this in mind, how do we stop the errors?

---

<div class="post-metadata">

**Author:** ![Kent1](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@Kent1](https://community.n8n.io/u/Kent1)\
**Post date:** [March 26, 2025, 8:30am UTC](https://community.n8n.io/t/task-runner-issue-with-external-module/90566/3 "2025-03-26T08:30:30Z")

</div>

@netroy,

Could you have a look please ? Seems the same than the issue fix by PR [fix(core): Pass `NODE_PATH` to task runners by netroy · Pull Request #13652 · n8n-io/n8n · GitHub](https://github.com/n8n-io/n8n/pull/13652) but for puppeteer I still have the issue

---

<div class="post-metadata">

**Author:** ![netroy](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/netroy/32/22154_2.png) [@netroy](https://community.n8n.io/u/netroy)\
**Post date:** [March 31, 2025, 11:04am UTC](https://community.n8n.io/t/task-runner-issue-with-external-module/90566/5 "2025-03-31T11:04:05Z")

</div>

1. Can you please share a simple workflow to reproduce this issue? That would hopefully speed up the fix, if we can reproduce this.
2. Please don’t summon people like this in posts. There is a long queue of unanswered questions here, and we are also busy with plenty of other tasks. Summoning people like this is a bit like asking to skip the queue, which IMO is unfair to everyone else here. If you need priority support, it might make a lot more sense to contact the support team at [help@n8n.io](mailto:help@n8n.io)

---

<div class="post-metadata">

**Author:** ![Kent1](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@Kent1](https://community.n8n.io/u/Kent1)\
**Post date:** [March 31, 2025, 11:49am UTC](https://community.n8n.io/t/task-runner-issue-with-external-module/90566/6 "2025-03-31T11:49:48Z")

</div>

Hello,

Noted I won’t do it again.

As you can see in WF just a require puppeteer trigger the error.

For the installation of puppeteer I have the following conf in Dockerfile :

> RUN npm install -g npm@10.8.2  
> ENV PUPPETEER\_SKIP\_CHROMIUM\_DOWNLOAD true  
> ENV PUPPETEER\_EXECUTABLE\_PATH /usr/bin/chromium-browser  
> WORKDIR /src  
> RUN apk upgrade && apk update && apk add --no-cache --virtual  
> .build-deps   
> udev   
> ttf-opensans   
> chromium   
> ca-certificates  
> RUN cd /usr/local/lib/node\_modules/n8n && npm install -g puppeteer

Thank for you help.

---

<div class="post-metadata">

**Author:** ![Anderson\_Souza](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/anderson_souza/32/74265_2.png) [@Anderson\_Souza](https://community.n8n.io/u/Anderson_Souza)\
**Post date:** [April 18, 2025, 10:07pm UTC](https://community.n8n.io/t/task-runner-issue-with-external-module/90566/7 "2025-04-18T22:07:12Z")

</div>

I have a very similar problem when running puppeteer in a task runner, but in my case require(‘puppeteer’) works and the fail occurs on puppeteer.launch(). The code with complete scraping process works with task runners disabled.  
Bellow are some images with details about the code and error.

 ![Captura de tela de 2025-04-18 20-04-20](https://europe1.discourse-cdn.com/n8n/original/3X/5/f/5f59c57283c5aa260f5ad66ea5a69a9d3fdf01ce.png)  
 ![Captura de tela de 2025-04-18 20-03-56](https://europe1.discourse-cdn.com/n8n/original/3X/9/0/90d1b1d3582c55bb69df1fbe8b16e4e2c4b62c20.png)

---

<div class="post-metadata">

**Author:** ![Kent1](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@Kent1](https://community.n8n.io/u/Kent1)\
**Post date:** [April 19, 2025, 7:12am UTC](https://community.n8n.io/t/task-runner-issue-with-external-module/90566/8 "2025-04-19T07:12:42Z")

</div>

It should be fixed in next version but you should add this env var yo make it work

N8N\_RUNNERS\_ALLOW\_PROTOTYPE\_MUTATION=true

---

<div class="post-metadata">

**Author:** ![ioitiki](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ioitiki/32/74222_2.png) [@ioitiki](https://community.n8n.io/u/ioitiki)\
**Post date:** [April 19, 2025, 8:22am UTC](https://community.n8n.io/t/task-runner-issue-with-external-module/90566/9 "2025-04-19T08:22:36Z")

</div>

@Kent1 I’ve added the env and i’m currently on 1.89.2. I’ve successfully installed other packages like remeda but i’m getting the following with cctx. Do you think the next version will cover this?

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/7/e/7e085faecba9c8055039229a7961cdca758b9ae8.png)

---

<div class="post-metadata">

**Author:** ![Kent1](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@Kent1](https://community.n8n.io/u/Kent1)\
**Post date:** [April 19, 2025, 8:47am UTC](https://community.n8n.io/t/task-runner-issue-with-external-module/90566/10 "2025-04-19T08:47:09Z")

</div>

Yes it should fix this !

---

<div class="post-metadata">

**Author:** ![Anderson\_Souza](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/anderson_souza/32/74265_2.png) [@Anderson\_Souza](https://community.n8n.io/u/Anderson_Souza)\
**Post date:** [April 19, 2025, 8:41pm UTC](https://community.n8n.io/t/task-runner-issue-with-external-module/90566/11 "2025-04-19T20:41:14Z")

</div>

I tried, but still not working. Lets wait for the next version and see if this problem will be solved. My worry is ‘N8N\_RUNNERS\_ENABLED=true’ become default before this problem beeing solved.

---

<div class="post-metadata">

**Author:** ![Kent1](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@Kent1](https://community.n8n.io/u/Kent1)\
**Post date:** [April 20, 2025, 5:28am UTC](https://community.n8n.io/t/task-runner-issue-with-external-module/90566/12 "2025-04-20T05:28:52Z")

</div>

This PR (not released in 1.89.2) fix the issue I could test it, and was a le to used puppeteer again.

Just wait this PR be used in futur version

> <https://github.com/n8n-io/n8n/pull/14638>
>
> \## Summary
> 
> The \[recently added\](https://github.com/n8n-io/n8n/pull/14515) \`N8…N\_RUNNERS\_ALLOW\_PROTOTYPE\_MUTATION\` is being filtered out when spawning the task runner.
> 
> \## Related Linear tickets, Github issues, and Community forum posts
> 
> https://github.com/n8n-io/n8n/issues/14211
> 
> \## Review / Merge checklist
> 
> \- \[\] PR title and summary are descriptive. (\[conventions\](../blob/master/.github/pull\_request\_title\_conventions.md)) 
> \- \[\] \[Docs updated\](https://github.com/n8n-io/n8n-docs) or follow-up ticket created.
> \- \[\] Tests included. 
> \- \[\] PR Labeled with \`release/backport\` (if the PR is an urgent fix that needs to be backported)

---

<div class="post-metadata">

**Author:** ![ioitiki](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ioitiki/32/74222_2.png) [@ioitiki](https://community.n8n.io/u/ioitiki)\
**Post date:** [April 20, 2025, 6:40pm UTC](https://community.n8n.io/t/task-runner-issue-with-external-module/90566/13 "2025-04-20T18:40:09Z")

</div>

@Kent1

I tried building from master and added the one extra line to install ts-kraken:

```auto
ARG NODE_VERSION=20
FROM n8nio/base:${NODE_VERSION}

ARG N8N_VERSION
RUN if [-z "$N8N_VERSION"] ; then echo "The N8N_VERSION argument is missing!" ; exit 1; fi

LABEL org.opencontainers.image.title="n8n"
LABEL org.opencontainers.image.description="Workflow Automation Tool"
LABEL org.opencontainers.image.source="https://github.com/n8n-io/n8n"
LABEL org.opencontainers.image.url="https://n8n.io"
LABEL org.opencontainers.image.version=${N8N_VERSION}

ENV N8N_VERSION=${N8N_VERSION}
ENV NODE_ENV=production
ENV N8N_RELEASE_TYPE=stable
RUN set -eux; \
	npm install -g --omit=dev n8n@${N8N_VERSION} --ignore-scripts && \
	npm rebuild --prefix=/usr/local/lib/node_modules/n8n sqlite3 && \
	rm -rf /usr/local/lib/node_modules/n8n/node_modules/@n8n/chat && \
	rm -rf /usr/local/lib/node_modules/n8n/node_modules/@n8n/design-system && \
	rm -rf /usr/local/lib/node_modules/n8n/node_modules/n8n-editor-ui/node_modules && \
	find /usr/local/lib/node_modules/n8n -type f -name "*.ts" -o -name "*.js.map" -o -name "*.vue" | xargs rm -f && \
	rm -rf /root/.npm

# Setup the Task Runner Launcher
ARG TARGETPLATFORM
ARG LAUNCHER_VERSION=1.1.1
COPY n8n-task-runners.json /etc/n8n-task-runners.json
# Download, verify, then extract the launcher binary
RUN \
	if [["$TARGETPLATFORM" = "linux/amd64"]]; then export ARCH_NAME="amd64"; \
	elif [["$TARGETPLATFORM" = "linux/arm64"]]; then export ARCH_NAME="arm64"; fi; \
	mkdir /launcher-temp && \
	cd /launcher-temp && \
	wget https://github.com/n8n-io/task-runner-launcher/releases/download/${LAUNCHER_VERSION}/task-runner-launcher-${LAUNCHER_VERSION}-linux-${ARCH_NAME}.tar.gz && \
	wget https://github.com/n8n-io/task-runner-launcher/releases/download/${LAUNCHER_VERSION}/task-runner-launcher-${LAUNCHER_VERSION}-linux-${ARCH_NAME}.tar.gz.sha256 && \
	# The .sha256 does not contain the filename --> Form the correct checksum file
	echo "$(cat task-runner-launcher-${LAUNCHER_VERSION}-linux-${ARCH_NAME}.tar.gz.sha256) task-runner-launcher-${LAUNCHER_VERSION}-linux-${ARCH_NAME}.tar.gz" > checksum.sha256 && \
	sha256sum -c checksum.sha256 && \
	tar xvf task-runner-launcher-${LAUNCHER_VERSION}-linux-${ARCH_NAME}.tar.gz --directory=/usr/local/bin && \
	cd - && \
	rm -r /launcher-temp

COPY docker-entrypoint.sh /

RUN \
	mkdir .n8n && \
	chown node:node .n8n
ENV SHELL /bin/sh

RUN npm install -g ts-kraken

USER node
ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]

```

```auto
docker buildx build --platform linux/amd64 --build-arg N8N_VERSION=1.89.2 -t n8n:1.89.2-andy .

docker tag n8n:1.89.2-andy registry.digitalocean.com/platform-5-ecr/n8n:0.1.8

docker push registry.digitalocean.com/platform-5-ecr/n8n:0.1.8

```

i have this as well:

```auto
# n8n-values.yaml
imagePullSecret: "platform-5-ecr"
image:
  repository: "registry.digitalocean.com/platform-5-ecr/n8n"
  tag: "0.1.8"
resources:
  requests:
    memory: "1Gi"
  limits:
    memory: "2Gi"
n8n:
  extraEnv:
    - name: NODE_FUNCTION_ALLOW_BUILTIN
      value: "*"
    - name: NODE_FUNCTION_ALLOW_EXTERNAL
      value: "*"
    - name: N8N_RUNNERS_ALLOW_PROTOTYPE_MUTATION
      value: "true"

```

and can confirm that prior to adding NODE\_FUNCTION\_ALLOW\_BUILTIN I was unable to use crypto after which it works. So my env vars are making it to the env presumably.

here is my issue

working:

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/c/f/cf147c571e62e93de66a4e6a64ef35bb5bffbc17.png)

not working:

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/5/7/578472dc9300d06a69ae701af19e25882006e588.png)

Any help would be awesome. Thanks in advance 😃

---

<div class="post-metadata">

**Author:** ![Kent1](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@Kent1](https://community.n8n.io/u/Kent1)\
**Post date:** [April 22, 2025, 9:09am UTC](https://community.n8n.io/t/task-runner-issue-with-external-module/90566/14 "2025-04-22T09:09:42Z")

</div>

It should be fix in [1.90.0](https://github.com/n8n-io/n8n/compare/n8n@1.89.0...n8n@1.90.0)

---

<div class="post-metadata">

**Author:** ![Kent1](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@Kent1](https://community.n8n.io/u/Kent1)\
**Post date:** [April 22, 2025, 7:03pm UTC](https://community.n8n.io/t/task-runner-issue-with-external-module/90566/15 "2025-04-22T19:03:01Z")

</div>

Did you test the last version ?

---

<div class="post-metadata">

**Author:** ![ioitiki](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ioitiki/32/74222_2.png) [@ioitiki](https://community.n8n.io/u/ioitiki)\
**Post date:** [April 22, 2025, 7:18pm UTC](https://community.n8n.io/t/task-runner-issue-with-external-module/90566/16 "2025-04-22T19:18:24Z")

</div>

Awesome thank you.

And no just the master branch from a couple days ago with my one change to add the nodejs module

---

<div class="post-metadata">

**Author:** ![ioitiki](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ioitiki/32/74222_2.png) [@ioitiki](https://community.n8n.io/u/ioitiki)\
**Post date:** [April 22, 2025, 9:23pm UTC](https://community.n8n.io/t/task-runner-issue-with-external-module/90566/17 "2025-04-22T21:23:44Z")

</div>

![image](https://europe1.discourse-cdn.com/n8n/original/3X/5/6/566d9a25fc7c4f8d26795349bec152cf2ccbd34a.png)

i can confirm that it works now @Kent1 😃

---

<div class="post-metadata">

**Author:** ![Kent1](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@Kent1](https://community.n8n.io/u/Kent1)\
**Post date:** [June 12, 2025, 9:16pm UTC](https://community.n8n.io/t/task-runner-issue-with-external-module/90566/18 "2025-06-12T21:16:10Z")

</div>

Can you tell me if it’s still working for you in version 1.95.3 or higher ? I have issue with puppeteer and try to see if it’s only from my side or not

Thanks for your help

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [September 10, 2025, 9:16pm UTC](https://community.n8n.io/t/task-runner-issue-with-external-module/90566/19 "2025-09-10T21:16:15Z")

</div>

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