Fix frontend build dependencies
This commit is contained in:
6
start.sh
6
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}"
|
||||
|
||||
Reference in New Issue
Block a user