From 1791e5535621d71e672a3ebe7552b097566f0be7 Mon Sep 17 00:00:00 2001 From: Xu Han Date: Fri, 29 Nov 2024 05:52:51 +0000 Subject: [PATCH] chore: update setup_env.py to fix npm install issue --- source/script/setup_env.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/script/setup_env.sh b/source/script/setup_env.sh index 58d583bbb..dd92806d6 100644 --- a/source/script/setup_env.sh +++ b/source/script/setup_env.sh @@ -6,7 +6,13 @@ sudo yum groupinstall "Development Tools" -y sudo yum install python3 -y sudo yum install python3-pip -y # Install Node.js and npm -sudo yum install nodejs npm -y +node_version="v22.11.0" +file_name="node-${node_version}-linux-x64" +wget "https://nodejs.org/dist/${node_version}/${file_name}.tar.xz" +sudo tar xvf "${file_name}.tar.xz" --directory=/usr/local +sudo mv "/usr/local/${file_name}" /usr/local/nodejs +sudo ln -sf /usr/local/nodejs/bin/node /usr/bin/node +sudo ln -sf /usr/local/nodejs/bin/npm /usr/bin/npm # Install AWS CLI pip3 install awscli # Install Docker