fix: 增加本地启动前置检查 - #97
Merged
Merged
Conversation
added 2 commits
June 3, 2026 16:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
本地首次启动时容易把“准备开发环境”和“启动应用”混在一起。缺少
server/.venv、后端核心包、Electron 依赖或 renderer 构建产物时,旧入口会较晚失败,后端还可能回退系统 Python,容易误用 Conda 或系统环境。改动
scripts/dev-prereqs.mjs,集中封装本地启动前置检查。npm run server启动前检查server/.venv和后端核心包,不再默认回退系统 Python。npm start/npm run start:electron启动前检查 Electron 依赖和 rendererdist/index.html。npm run doctor只检查本地开发前置条件,不安装依赖。scripts/dev-prereqs.test.mjs覆盖缺 venv、半安装 venv、缺 Electron 和缺 renderer dist 的提示行为。.gitignore。验证
node --test scripts/dev-prereqs.test.mjs:5/5 通过node --check scripts/dev-prereqs.mjs; node --check scripts/start-server-dev.mjs; node --check scripts/start-electron-dev.mjs; node --check scripts/check-dev-prereqs.mjs:通过npm run doctor:当前半安装 venv 下按设计失败,明确提示缺fastapi, funasr, transformers,没有继续安装风险