diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 7ca7958..f02253c 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -31,6 +31,7 @@ "lucide-react": "^0.544.0", "react": "^19.1.1", "react-dom": "^19.1.1", + "react-is": "^19.2.0", "react-markdown": "^10.1.0", "recharts": "^3.2.1", "remark-gfm": "^4.0.1", @@ -11884,8 +11885,7 @@ "version": "19.2.4", "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.4.tgz", "integrity": "sha512-W+EWGn2v0ApPKgKKCy/7s7WHXkboGcsrXE+2joLyVxkbyVQfO3MUEaUQDHoSmb8TFFrSKYa9mw64WZHNHSDzYA==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/react-markdown": { "version": "10.1.0", diff --git a/frontend/package.json b/frontend/package.json index 663ed33..d7a31f4 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -40,6 +40,7 @@ "lucide-react": "^0.544.0", "react": "^19.1.1", "react-dom": "^19.1.1", + "react-is": "^19.2.0", "react-markdown": "^10.1.0", "recharts": "^3.2.1", "remark-gfm": "^4.0.1", diff --git a/start.sh b/start.sh index 4b1aa47..0d25275 100644 --- a/start.sh +++ b/start.sh @@ -174,7 +174,11 @@ build_frontend() { echo "" echo -e "${CYAN}构建前端...${NC}" if [ -d "frontend" ] && command -v npm >/dev/null 2>&1; then - (cd frontend && npm install --legacy-peer-deps && npm run build) + if [ -f "frontend/package-lock.json" ]; then + (cd frontend && npm ci && npm run build) + else + (cd frontend && npm install && npm run build) + fi echo -e "${GREEN}前端构建完成: ${FRONTEND_DIST}${NC}" else echo -e "${RED}前端构建失败: 需要 npm 和 frontend 目录${NC}"