From 8c7664a400d9dd23707f2c5e63fd3fde4c43d61e Mon Sep 17 00:00:00 2001 From: WanWanYun Date: Mon, 10 Nov 2025 23:35:33 +0800 Subject: [PATCH] =?UTF-8?q?v1.1.2:=20=E4=BF=AE=E5=A4=8D=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 主要修复: 1. 降级 better-sqlite3: 12.4.1 → 11.8.1 - 兼容 Node.js 18.x - 解决版本不匹配导致的安装失败 2. 添加编译工具依赖 - APT: build-essential, python3 - YUM/DNF: gcc-c++, make, python3 - Zypper: gcc-c++, make, python3 - 解决原生模块编译失败问题 问题分析: - better-sqlite3@12+ 要求 Node.js 20+ - 编译原生模块需要 C++ 编译器和 Python - 旧版本服务器可能缺少编译工具链 解决方案: - 使用兼容 Node.js 18+ 的 better-sqlite3 版本 - 自动安装所有必需的编译工具 - 确保在所有支持的系统上都能正常编译 --- backend/package.json | 2 +- install.sh | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/package.json b/backend/package.json index cbf0b1f..3292be6 100644 --- a/backend/package.json +++ b/backend/package.json @@ -18,7 +18,7 @@ "archiver": "^7.0.1", "basic-ftp": "^5.0.4", "bcryptjs": "^3.0.3", - "better-sqlite3": "^12.4.1", + "better-sqlite3": "^11.8.1", "cookie-parser": "^1.4.7", "cors": "^2.8.5", "dotenv": "^16.3.1", diff --git a/install.sh b/install.sh index 7709c4f..e9a8492 100644 --- a/install.sh +++ b/install.sh @@ -3,7 +3,7 @@ ################################################################################ # 玩玩云 (WanWanYun) - 一键部署脚本 # 项目地址: https://gitee.com/yu-yon/vue-driven-cloud-storage -# 版本: v1.1.1 +# 版本: v1.1.2 ################################################################################ set -e @@ -377,22 +377,22 @@ install_dependencies() { case $PKG_MANAGER in apt) apt-get update - apt-get install -y curl wget git unzip lsb-release + apt-get install -y curl wget git unzip lsb-release build-essential python3 install_nodejs_apt install_nginx_apt ;; yum) - yum install -y curl wget git unzip redhat-lsb-core + yum install -y curl wget git unzip redhat-lsb-core gcc-c++ make python3 install_nodejs_yum install_nginx_yum ;; dnf) - dnf install -y curl wget git unzip redhat-lsb-core + dnf install -y curl wget git unzip redhat-lsb-core gcc-c++ make python3 install_nodejs_dnf install_nginx_dnf ;; zypper) - zypper install -y curl wget git unzip lsb-release + zypper install -y curl wget git unzip lsb-release gcc-c++ make python3 install_nodejs_zypper install_nginx_zypper ;;