Issue since n8n 2.37.0 with npm install dockerfile

Hey, we use a custom docker image to install packages.
We noticed with version 2.37.0 we cannot do our old way of installing due to some errors in the docker build

FROM artifactory/n8n-io/n8n:2.37.0

USER root

RUN mkdir -p /home/node/.n8n/nodes

RUN chown -R node:node /home/node/.n8n

WORKDIR /home/node/.n8n/nodes

RUN npm install @lexeri/n8n-nodes-lexeri
RUN npm install @frontify/n8n-nodes-frontify

RUN chown -R node:node /home/node/.n8n

USER node

Describe the problem/error/question

Error with docker image creation since version 2.37.0 npm install community nodes. It is working until 2.36.9

What is the error message (if any)?

=> [stage-0 7/10] WORKDIR /home/node/.n8n/nodes 0.0s

=> ERROR [stage-0 8/10] RUN npm install @lexeri/n8n-nodes-lexeri 10.2s

[stage-0 8/10] RUN npm install @lexeri/n8n-nodes-lexeri:
9.080 npm warn deprecated uuid@10.0.0: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).
10.16 npm error code 1
10.16 npm error path /home/node/.n8n/nodes/node_modules/isolated-vm
10.16 npm error command failed
10.16 npm error command sh -c node-gyp-build || node-gyp rebuild --release -j max
10.16 npm error gyp info it worked if it ends with ok
10.16 npm error gyp info using node-gyp@12.4.0
10.16 npm error gyp info using node@26.5.1 | linux | x64
10.16 npm error gyp ERR! find Python
10.16 npm error gyp ERR! find Python --python was not set on the command line
10.16 npm error gyp ERR! find Python Python is not set from environment variable PYTHON
10.16 npm error gyp ERR! find Python checking if “python3” can be used
10.16 npm error gyp ERR! find Python - executable path is “”
10.16 npm error gyp ERR! find Python - “” could not be run
10.16 npm error gyp ERR! find Python checking if “python” can be used
10.16 npm error gyp ERR! find Python - executable path is “”
10.16 npm error gyp ERR! find Python - “” could not be run
10.16 npm error gyp ERR! find Python
10.16 npm error gyp ERR! find Python **********************************************************
10.16 npm error gyp ERR! find Python You need to install the latest version of Python.
10.16 npm error gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
10.16 npm error gyp ERR! find Python you can try one of the following options:
10.16 npm error gyp ERR! find Python - Use the switch --python=“/path/to/pythonexecutable”
10.16 npm error gyp ERR! find Python (accepted by both node-gyp and npm)
10.16 npm error gyp ERR! find Python - Set the environment variable PYTHON
10.16 npm error gyp ERR! find Python For more information consult the documentation at:
10.16 npm error gyp ERR! find Python GitHub - nodejs/node-gyp: Node.js native addon build tool · GitHub
10.16 npm error gyp ERR! find Python **********************************************************
10.16 npm error gyp ERR! find Python
10.16 npm error gyp ERR! configure error
10.16 npm error gyp ERR! stack Error: Could not find any Python installation to use
10.16 npm error gyp ERR! stack at PythonFinder.fail (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:300:11)
10.16 npm error gyp ERR! stack at PythonFinder.findPython (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:160:17)
10.16 npm error gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
10.16 npm error gyp ERR! stack at async configure (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:27:18)
10.16 npm error gyp ERR! stack at async run (/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js:81:18)
10.16 npm error gyp ERR! System Linux 6.18.33.2-microsoft-standard-WSL2
10.16 npm error gyp ERR! command “/usr/bin/node” “/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild”
10.16 npm error gyp ERR! cwd /home/node/.n8n/nodes/node_modules/isolated-vm
10.16 npm error gyp ERR! node -v v26.5.1
10.16 npm error gyp ERR! node-gyp -v v12.4.0
10.16 npm error gyp ERR! $npm_package_name isolated-vm
10.16 npm error gyp ERR! $npm_package_version 6.2.0
10.16 npm error gyp ERR! not ok
10.16 npm error gyp info it worked if it ends with ok
10.16 npm error gyp info using node-gyp@12.4.0
10.16 npm error gyp info using node@26.5.1 | linux | x64
10.16 npm error gyp ERR! find Python
10.16 npm error gyp ERR! find Python --python was not set on the command line
10.16 npm error gyp ERR! find Python Python is not set from environment variable PYTHON
10.16 npm error gyp ERR! find Python checking if “python3” can be used
10.16 npm error gyp ERR! find Python - executable path is “”
10.16 npm error gyp ERR! find Python - “” could not be run
10.16 npm error gyp ERR! find Python checking if “python” can be used
10.16 npm error gyp ERR! find Python - executable path is “”
10.16 npm error gyp ERR! find Python - “” could not be run
10.16 npm error gyp ERR! find Python
10.16 npm error gyp ERR! find Python **********************************************************
10.16 npm error gyp ERR! find Python You need to install the latest version of Python.
10.16 npm error gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
10.16 npm error gyp ERR! find Python you can try one of the following options:
10.16 npm error gyp ERR! find Python - Use the switch --python=“/path/to/pythonexecutable”
10.16 npm error gyp ERR! find Python (accepted by both node-gyp and npm)
10.16 npm error gyp ERR! find Python - Set the environment variable PYTHON
10.16 npm error gyp ERR! find Python For more information consult the documentation at:
10.16 npm error gyp ERR! find Python GitHub - nodejs/node-gyp: Node.js native addon build tool · GitHub
10.16 npm error gyp ERR! find Python **********************************************************
10.16 npm error gyp ERR! find Python
10.16 npm error gyp ERR! configure error
10.16 npm error gyp ERR! stack Error: Could not find any Python installation to use
10.16 npm error gyp ERR! stack at PythonFinder.fail (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:300:11)
10.16 npm error gyp ERR! stack at PythonFinder.findPython (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:160:17)
10.16 npm error gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
10.16 npm error gyp ERR! stack at async configure (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:27:18)
10.16 npm error gyp ERR! stack at async run (/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js:81:18)
10.16 npm error gyp ERR! System Linux 6.18.33.2-microsoft-standard-WSL2
10.16 npm error gyp ERR! command “/usr/bin/node” “/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild” “–release” “-j” “max”
10.16 npm error gyp ERR! cwd /home/node/.n8n/nodes/node_modules/isolated-vm
10.16 npm error gyp ERR! node -v v26.5.1
10.16 npm error gyp ERR! node-gyp -v v12.4.0
10.16 npm error gyp ERR! $npm_package_name isolated-vm
10.16 npm error gyp ERR! $npm_package_version 6.2.0
10.16 npm error gyp ERR! not ok
10.17 npm error A complete log of this run can be found in: /root/.npm/_logs/2026-10-16T10_28_07_981Z-debug-0.log


Dockerfile:24

22 | WORKDIR /home/node/.n8n/nodes
23 |
24 | >>> RUN npm install @lexeri/n8n-nodes-lexeri
25 | RUN npm install @frontify/n8n-nodes-frontify

26
ERROR: failed to build: failed to solve: process “/bin/sh -c npm install @lexeri/n8n-nodes-lexeri” did not complete successfully: exit code: 1

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 2.37.0
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):docker
  • Operating system:ubuntu wsl

Hey @anelmu, while you wait for a response, here are some things that might help:

Suggested resources

Automatically matched to your question.

Docs:

Forum:

@Miquel_Colomer, @trinq - you’ve helped with similar issues before, can you take a look?

Automatically suggested by n8n’s community bot. It’s a pilot - please share feedback here.

I’d investigate the dependency installation first rather than changing the entire Docker image.

Your logs show that npm is trying to build isolated-vm@6.2.0 using Node.js 26.5.1, but node-gyp cannot find Python.

There’s also a possible compatibility issue: according to the isolated-vm maintainers, version 6.x supports Node 24, while Node 26 requires version 7.x. So installing Python alone might not resolve it.

I’d troubleshoot it in this order:

Check the Node.js version in both Docker images. Compare 2.36.9 and 2.37.0 using node -v to see whether the underlying runtime changed.

Try installing without automatic peer dependency resolution. Since n8n already provides its own runtime dependencies, npm might be pulling in additional packages unnecessarily.

Try replacing the two install commands with:

RUN npm install --omit=dev --legacy-peer-deps
@lexeri/n8n-nodes-lexeri
@frontify/n8n-nodes-frontify

This is worth testing, but only works if the problematic dependency comes from npm’s peer dependency resolution.

Check where isolated-vm is coming from. If the build still fails, inspect the dependency tree or generated package-lock. That will tell you which package requires version 6.2.0.

If native compilation is actually required, use a multi-stage Docker build with a matching Node.js version and Python, make, and g++ installed in the builder stage. The official n8n runtime images no longer provide a normal package manager, so simply adding RUN apk add to your existing Dockerfile may not work.

I wouldn’t recommend npm install --ignore-scripts as a permanent fix because native modules may install without compiling and then fail at runtime.

For now, since 2.36.9 is working in your environment, keeping that version pinned is a reasonable temporary workaround while investigating the dependency change.

My suspicion is that the newer runtime is exposing a native dependency compatibility issue rather than a problem with your Dockerfile’s directory permissions.

I’d start with the --legacy-peer-deps test and compare the Node versions before rebuilding the whole image.

If you just want the build working again while you sort out the Node version question, a multi-stage build avoids compiling anything inside the n8n image. Install the nodes in a plain Node 24 image that has Python and build tools, then copy the result over:

FROM node:24-bookworm AS nodes
WORKDIR /build
RUN npm init -y && npm install --omit=dev @lexeri/n8n-nodes-lexeri @frontify/n8n-nodes-frontify

FROM artifactory/n8n-io/n8n:2.37.0
USER root
RUN mkdir -p /home/node/.n8n/nodes
COPY --from=nodes /build/node_modules /home/node/.n8n/nodes/node_modules
COPY --from=nodes /build/package.json /home/node/.n8n/nodes/package.json
RUN chown -R node:node /home/node/.n8n
USER node

Two things to check: match the Node major version of the first stage to what node -v prints inside the n8n image, otherwise native modules like isolated-vm will be built for the wrong ABI. And if either package lists n8n-workflow as a regular dependency instead of a peer dependency, it will pull in the heavy runtime packages, which is often what triggers the isolated-vm build in the first place. Adding --legacy-peer-deps in the first stage usually trims that down.

Hi @anelmu, one correction to the multi-stage example: node:24-bookworm builds against Debian/glibc, while upstream n8n 2.37.0 uses Node 26.5.1 on Alpine/musl. Match the Node runtime, libc and target architecture before copying native modules. If your Artifactory image mirrors upstream, use a matching Alpine builder.

Both community packages currently declare n8n-workflow as a peer dependency, so Stephen3’s --legacy-peer-deps test is relevant. That flag doesn’t remove regular dependencies. If isolated-vm is still pulled in, could you share npm explain isolated-vm or its lockfile entries? Building 6.2.0 elsewhere won’t make it support Node 26.

One thing I’d control before comparing the two images: the community-node dependencies. Both npm install lines use unpinned package names, so a rebuild can resolve a different dependency tree as well as use a different base image.

Do you still have the package.json and package-lock.json from the last successful build’s /home/node/.n8n/nodes directory? I’d use those in a disposable build of each image, with npm ci and the same dependency-resolution settings. Record node -v and npm -v for each. That gives you a much cleaner comparison than rerunning the two install lines today.

Keep Stephen’s peer-dependency test separate from that comparison: changing --legacy-peer-deps changes what gets installed. If the lockfile was generated with that flag, npm requires it for ⁠npm ci⁠ too⁠.

If the old lockfile is gone, a newly pinned set still gives you a repeatable test, but it won’t reconstruct the previously working build. Anshul’s request for npm explain isolated-vm is then the useful next piece: it identifies the dependency path instead of assuming Python is the whole problem.

Hi Stephen thanks.

We have tested a bit more.

--legacy-peer-deps actually works.

The old image used node version 24, while the newer one uses node 26.

nodes@ /home/node/.n8n/nodes
`-- @frontify/n8n-nodes-frontify@2.0.0
  `-- n8n-workflow@2.16.0
    `-- @n8n/expression-runtime@0.8.0
      `-- isolated-vm@6.2.0 

It perfectly runs through and doesn’t install isolated-vm.

Is it because node26 doesn’t have a prebuilt isolated-vm package, it falls back using python which n8n doesn’t ship and breaks.