diff --git a/dev.sh b/dev.sh index b68f2b6..d71b705 100755 --- a/dev.sh +++ b/dev.sh @@ -127,6 +127,12 @@ check_deps() { cd apps/jingrow/frontend && npm install && cd ../.. fi + # 即使 node_modules 存在,也校验 vite 是否可用(可能之前安装不完整) + if [ ! -x "apps/jingrow/frontend/node_modules/.bin/vite" ]; then + warn "未检测到 vite,可执行文件缺失,重新安装前端依赖..." + (cd apps/jingrow/frontend && npm install) + fi + # 检查后端依赖(优先使用 uv) info "同步后端依赖 (uv)..." if [ -f "apps/jingrow/pyproject.toml" ]; then