cli: pocket compile --aot in a source checkout reports the missing pocketjs.wasm without naming the command that builds it
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 85/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- bun, typescript, wasm
- 领域
- cli
调研方向
打开 tools/aot-compile.ts 中第 128-129 行附近、抛出缺失 layout oracle 的位置,并与 site/microts/lib/kit.ts:53 中同一文件已经使用的措辞进行比较。用 --aot 编译命令在没有 platforms/web/pocketjs.wasm 的 checkout 中复现,然后改写错误信息,使其点名 bun tools/wasm.ts 以及 rustup target add wasm32-unknown-unknown 这一要求;如果修复改为构建该资源,则 tools/wasm.ts 导出了 ensureHostWasm()。完成意味着该消息告诉 checkout 用户如何生成该文件。
由索引模型根据 Issue 内容生成。
描述
Version
PocketJS v0.17.0 (83c6cac9, current main), used as a git submodule. macOS 27.2 arm64, Bun 1.4.2.
Repro
In a fresh clone of the repository (no platforms/web/pocketjs.wasm; the file is in .gitignore), compile any aot: true application:
bun $POCKETJS/tools/pocket.ts compile --config pocket.host.config.ts --aot --out gen
Actual
✓ pocket.host.config.ts app
✓ repro-esp32s3 hosts the application
✓ TypeScript (62 app module(s))
✓ ResolvedBuildPlan sha256:…
PocketJS: AOT: prebuilt layout oracle not found: <pocketjs>/platforms/web/pocketjs.wasm; install/build the compiler's wasm asset before compilation
cli.md states that a missing oracle is an error but not how to produce it. The npm package ships the file (files whitelist; CI runs bun tools/wasm.ts before publishing, skills/pocketjs-release/SKILL.md), so the case arises in checkouts: a framework clone, or a product that pins PocketJS as a submodule and runs the CLI from it, as an ESP-IDF build does.
Expected
In a checkout the message names the command and its requirement, for example:
AOT: the layout oracle platforms/web/pocketjs.wasm is missing; build it with `bun tools/wasm.ts` (needs `rustup target add wasm32-unknown-unknown`)
site/microts/lib/kit.ts:53 already reports the same file this way. Alternatively the CLI builds it: tools/wasm.ts exports ensureHostWasm().
Cause
tools/aot-compile.ts:128–129.
Workaround
Run bun tools/wasm.ts in the PocketJS checkout before the first AOT compile.
- 主要语言
- TypeScript
- 星标
- 1.6k
- 派生
- 88
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pocket-stack/pocketjs 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 74/100
pocket-stack/pocketjs#729 ·
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
pocket-stack/pocketjs#725 ·
-
enhancement
难度 4/5 3-5 天 新手友好度 62/100
pocket-stack/pocketjs#728 ·
-
enhancement
难度 5/5 一周以上 新手友好度 30/100
pocket-stack/pocketjs#727 ·
-
enhancement
难度 3/5 1-2 天 新手友好度 52/100
pocket-stack/pocketjs#726 ·
查看 pocket-stack/pocketjs 的全部 Issue
相似的 Issue
-
kind:defect
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
mux-labs/mux-frontend#1240 ·
维护者通常 1 天内回复
-
area: agents-mcp priority: normal
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
Wait for the IDS correction dialog to settle in the stale-audit test可能已有人在做 @louistrue 今天认领。 未关闭ready
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
Hono path parameters with a regex pattern keep the pattern in the OpenAPI path可能已有人在做 @0z5a 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
cloudflare/chanfana#400 ·
维护者通常 1 天内回复