From 3117bf518ceab3fcec9d10176f9a9fc544f7032d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=A6=82=E5=A8=81?= Date: Tue, 30 Sep 2025 16:50:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B0=83=E6=95=B4=E5=90=AF=E7=94=A8?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- start.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/start.sh b/start.sh index 1a9cef4..e94ca17 100644 --- a/start.sh +++ b/start.sh @@ -1,7 +1,17 @@ #!/bin/bash + +# ---- 加载 nvm ---- +export NVM_DIR="$HOME/.nvm" +if [ -s "$NVM_DIR/nvm.sh" ]; then + \. "$NVM_DIR/nvm.sh" # 这是必须的 +else + echo "Error: nvm.sh not found!" + exit 1 +fi + # 切换 Node.js 版本 -nvm use v22.18.0 +nvm use v22.18.0 || { echo "Failed to switch Node.js version"; exit 1; } # 激活 Python 虚拟环境 source backend/venv/bin/activate