fix(build): compiled binary missing @modelcontextprotocol/sdk modules
shadcn (web devDependency) pulled a second peer copy of @modelcontextprotocol/[email protected].1 (zod@3), so the server's zod@4 copy lived in the npm cache as sdk/1.30.1_1. `deno compile --exclude-unused-npm` embeds that _1 folder but the pruned snapshot resolves it as sdk/1.30.1, so every SDK import failed at startup with ERR_MODULE_NOT_FOUND. - drop the shadcn CLI dependency; vendor its tailwind.css (the only runtime use) as apps/web/app/shadcn-tailwind.css, removing the duplicate - scripts/check-compiled-binary.sh: run the compiled binary with an empty env and `--role preflight`; it must load the full module graph and exit 2 on config validation. Wired into `deno task ci` (check:binary) and the Dockerfile build stage. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
266d66ddbb
commit
f05d6195a3
8 files changed
+158
-1148
No files matched your search
@@ -86,7 +86,11 @@
|
||||
"command": "deno run -A scripts/check-copy-punctuation.mjs --strict"
|
||||
},
|
||||
"build": "cd apps/web && deno task build && cd ../server && deno task compile",
|
||||
"ci": "deno task typecheck && deno task lint && deno task test && deno task check:tokens && deno task check:copy && deno task build",
|
||||
"check:binary": {
|
||||
"description": "编译产物自检:空环境跑 dist/umt-server --role preflight,确认完整模块图可加载(防 deno compile 漏嵌 npm 模块)",
|
||||
"command": "sh scripts/check-compiled-binary.sh"
|
||||
},
|
||||
"ci": "deno task typecheck && deno task lint && deno task test && deno task check:tokens && deno task check:copy && deno task build && deno task check:binary",
|
||||
"gen:tokens": "cd apps/web && deno task gen:tokens"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user