From e953bbd47c36d4b3cb5a38141de2595ffdcd467b Mon Sep 17 00:00:00 2001 From: zhanghongyu Date: Tue, 19 Aug 2025 10:53:39 +0800 Subject: [PATCH] Dockerfile: fix matter build error when the version of nodejs used during the installation of the dependency library is too different from the version of nodejs actually used, we may encounter version incompatibility issues, resulting in a runtime crash. Signed-off-by: zhanghongyu --- tools/ci/docker/linux/Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/ci/docker/linux/Dockerfile b/tools/ci/docker/linux/Dockerfile index fc4c10d8853..5348f67d7c4 100644 --- a/tools/ci/docker/linux/Dockerfile +++ b/tools/ci/docker/linux/Dockerfile @@ -70,6 +70,9 @@ RUN mkdir -p /tools/gn \ && cd gn && ./build/gen.py \ && cd out && ninja +# Upgrade nodejs to the stable version we need before install zap +RUN npm install -g n && n 20.10.0 node && hash -r + ENV ZAP_INSTALL_PATH=/tools/zap_release RUN mkdir -p $ZAP_INSTALL_PATH \ && cd $ZAP_INSTALL_PATH \ @@ -398,8 +401,8 @@ RUN pip3 install stringcase RUN pip3 install jinja2 RUN pip3 install coloredlogs -# Upgrade nodejs to the latest version -RUN npm install -g n && n stable && hash -r +# Upgrade nodejs to the stable version we need +RUN npm install -g n && n 20.10.0 node && hash -r # Used to generate symbol table files