From b0debf93a0e2433643c28fe56ddd46dcc383c646 Mon Sep 17 00:00:00 2001 From: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com> Date: Fri, 9 Jan 2026 13:37:34 -0500 Subject: [PATCH] Use dnf module for Node.js 18 instead of n version manager - damn it aarch64 (#16225) Use dnf module for Node.js 18 instead of n version manager The n version manager fails to extract Node.js archives due to very long file paths in include/node/openssl/archs/ directories when running in Docker BuildKit's overlay filesystem. This causes CI build failures with tar "Cannot open: Invalid argument" errors. Switch to installing Node.js 18 directly from CentOS Stream 9's module stream which avoids the archive extraction issue entirely. --- tools/ansible/roles/dockerfile/templates/Dockerfile.j2 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/ansible/roles/dockerfile/templates/Dockerfile.j2 b/tools/ansible/roles/dockerfile/templates/Dockerfile.j2 index a2d43cad59..009065f3c0 100644 --- a/tools/ansible/roles/dockerfile/templates/Dockerfile.j2 +++ b/tools/ansible/roles/dockerfile/templates/Dockerfile.j2 @@ -8,8 +8,7 @@ # UI_next build contaienr FROM quay.io/centos/centos:stream9 AS ui-builder USER root -RUN dnf -y update && dnf install -y nodejs make git -RUN npm install -g n && n 18 +RUN dnf -y update && dnf module -y enable nodejs:18 && dnf module -y install nodejs:18/common && dnf install -y make git COPY . /tmp/src/ WORKDIR /tmp/src/ @@ -159,7 +158,8 @@ RUN rm -rf /root/.cache && rm -rf /tmp/* {% if (build_dev|bool) or (kube_dev|bool) %} # Install development/test requirements -RUN dnf -y install \ +RUN dnf module -y enable nodejs:18 && dnf module -y install nodejs:18/common && \ + dnf -y install \ crun \ gdb \ gtk3 \ @@ -174,7 +174,6 @@ RUN dnf -y install \ vim \ nmap-ncat \ libpq-devel \ - nodejs \ nss \ make \ patch \ @@ -182,8 +181,7 @@ RUN dnf -y install \ tmux \ wget \ diffutils \ - unzip && \ - npm install -g n && n 18 && dnf remove -y nodejs + unzip RUN pip3.12 install -vv git+https://github.com/coderanger/supervisor-stdout.git@973ba19967cdaf46d9c1634d1675fc65b9574f6e RUN pip3.12 install -vv black setuptools-scm build