Hi n8n support,
I tried to build docker for n8n and got error below. Searched many places but have no clues. Could you help advise?
I added in Dockerfile.
npm config set strict-ssl false && \
node -v
v20.19.1
npm -v
11.3.0
python --version
Python 3.13.2
% docker buildx build --platform linux/arm64 --build-arg N8N_VERSION=1.90.0 -t n8n:1.90.0 .
241.9 added 2174 packages in 4m
241.9 + npm rebuild ‘–prefix=/usr/local/lib/node_modules/n8n’ sqlite3
243.5 npm error code 1
243.5 npm error path /usr/local/lib/node_modules/n8n/node_modules/sqlite3
243.5 npm error command failed
243.5 npm error command sh -c prebuild-install -r napi || node-gyp rebuild
243.5 npm error prebuild-install warn install self-signed certificate in certificate chain
243.5 npm error gyp info it worked if it ends with ok
243.5 npm error gyp info using [email protected]
243.5 npm error gyp info using [email protected] | linux | arm64
243.5 npm error gyp ERR! find Python
243.5 npm error gyp ERR! find Python Python is not set from command line or npm configuration
243.5 npm error gyp ERR! find Python Python is not set from environment variable PYTHON
243.5 npm error gyp ERR! find Python checking if “python3” can be used
243.5 npm error gyp ERR! find Python - “python3” is not in PATH or produced an error
243.5 npm error gyp ERR! find Python checking if “python” can be used
243.5 npm error gyp ERR! find Python - “python” is not in PATH or produced an error
243.5 npm error gyp ERR! find Python
243.5 npm error gyp ERR! find Python **********************************************************
243.5 npm error gyp ERR! find Python You need to install the latest version of Python.
243.5 npm error gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
243.5 npm error gyp ERR! find Python you can try one of the following options:
243.5 npm error gyp ERR! find Python - Use the switch --python=“/path/to/pythonexecutable”
243.5 npm error gyp ERR! find Python (accepted by both node-gyp and npm)
243.5 npm error gyp ERR! find Python - Set the environment variable PYTHON
243.5 npm error gyp ERR! find Python - Set the npm configuration variable python:
243.5 npm error gyp ERR! find Python npm config set python “/path/to/pythonexecutable”
243.5 npm error gyp ERR! find Python For more information consult the documentation at:
243.5 npm error gyp ERR! find Python GitHub - nodejs/node-gyp: Node.js native addon build tool
243.5 npm error gyp ERR! find Python **********************************************************
243.5 npm error gyp ERR! find Python
243.5 npm error gyp ERR! configure error
243.5 npm error gyp ERR! stack Error: Could not find any Python installation to use
243.5 npm error gyp ERR! stack at PythonFinder.fail (/usr/local/lib/node_modules/n8n/node_modules/node-gyp/lib/find-python.js:330:47)
243.5 npm error gyp ERR! stack at PythonFinder.runChecks (/usr/local/lib/node_modules/n8n/node_modules/node-gyp/lib/find-python.js:159:21)
243.5 npm error gyp ERR! stack at PythonFinder. (/usr/local/lib/node_modules/n8n/node_modules/node-gyp/lib/find-python.js:202:16)
243.5 npm error gyp ERR! stack at PythonFinder.execFileCallback (/usr/local/lib/node_modules/n8n/node_modules/node-gyp/lib/find-python.js:294:16)
243.5 npm error gyp ERR! stack at exithandler (node:child_process:430:5)
243.5 npm error gyp ERR! stack at ChildProcess.errorhandler (node:child_process:442:5)
243.5 npm error gyp ERR! stack at ChildProcess.emit (node:events:524:28)
243.5 npm error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12)
243.5 npm error gyp ERR! stack at onErrorNT (node:internal/child_process:483:16)
243.5 npm error gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
243.5 npm error gyp ERR! System Linux 6.10.14-linuxkit
243.5 npm error gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/n8n/node_modules/.bin/node-gyp” “rebuild”
243.5 npm error gyp ERR! cwd /usr/local/lib/node_modules/n8n/node_modules/sqlite3
243.5 npm error gyp ERR! node -v v20.19.0
243.5 npm error gyp ERR! node-gyp -v v8.4.1
243.5 npm error gyp ERR! not ok
243.5 npm notice
243.5 npm notice New major version of npm available! 10.8.2 → 11.3.0
243.5 npm notice Changelog: Release v11.3.0 · npm/cli · GitHub
243.5 npm notice To update run: npm install -g [email protected]
243.5 npm notice
243.5 npm error A complete log of this run can be found in: /root/.npm/_logs/2025-04-29T19_38_20_564Z-debug-0.log
Dockerfile:16
15 | ENV N8N_RELEASE_TYPE=stable
16 | >>> RUN set -eux;
17 | >>> npm config set strict-ssl false &&
18 | >>> npm install -g --omit=dev n8n@${N8N_VERSION} --ignore-scripts &&
19 | >>> npm rebuild --prefix=/usr/local/lib/node_modules/n8n sqlite3 &&
20 | >>> rm -rf /usr/local/lib/node_modules/n8n/node_modules/@n8n/chat &&
21 | >>> rm -rf /usr/local/lib/node_modules/n8n/node_modules/@n8n/design-system &&
22 | >>> rm -rf /usr/local/lib/node_modules/n8n/node_modules/n8n-editor-ui/node_modules &&
23 | >>> find /usr/local/lib/node_modules/n8n -type f -name “.ts" -o -name ".js.map” -o -name “*.vue” | xargs rm -f &&
24 | >>> rm -rf /root/.npm
25 |
---|
ERROR: failed to solve: process "/bin/sh -c set -eux; \tnpm config set strict-ssl false && \tnpm install -g --omit=dev n8n@${N8N_VERSION} --ignore-scripts && \tnpm rebuild --prefix=/usr/local/lib/node_modules/n8n sqlite3 && \trm -rf /usr/local/lib/node_modules/n8n/node_modules/@n8n/chat && \trm -rf /usr/local/lib/node_modules/n8n/node_modules/@n8n/design-system && \trm -rf /usr/local/lib/node_modules/n8n/node_modules/n8n-editor-ui/node_modules && \tfind /usr/local/lib/node_modules/n8n -type f -name ".ts" -o -name ".js.map" -o -name "*.vue" |
View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/imj1m8sjlcynkrmanvwflugq9