错误代码
每个 TX 代码都保持不变,并有专页说明原因和修复方法。代码永不重新编号或复用。
@textjs/core
@textjs/react
TX002在控制台根节点之外渲染Hooks and components must be rendered inside a console root (createConsoleRoot / renderToConsole).TX003未知宿主元素Unknown host element <…>. Use the exported components (<Box>, <Text>, …).TX004<Box> 嵌套在 <Text> 内<Box> cannot be nested inside <Text>.TX005卸载后渲染Cannot render into an unmounted console root.TX006组合键中存在未知修饰键Unknown modifier "…" in key combo "…".TX007组合键中存在未知按键Unknown key "…" in key combo "…".TX008空组合键Empty key combo "…".TX009应为单次击键"…" is not a single key stroke.TX010renderToTerminal 缺少 stdoutrenderToTerminal() found no stdout to write to.TX011<Image src> 缺少 DOM<Image src> needs a DOM; pass `pixels` instead.TX012<Image> 无法使用 2D 画布<Image> could not get a 2D canvas context to decode the image.TX013<Image> 加载失败<Image> failed to load "…".
@textjs/app
TX014在 <AppRouter> 外部使用… must be used inside <AppRouter>. Run your app with `text dev`, or wrap it in <AppRouter routes={…}>.TX015路由文件没有默认组件The default export is not a React Component in "…".TX016路由处理程序未返回 ResponseNo response is returned from route handler for … …. Ensure you return a `Response`.TX017没有生产构建Could not find a production build in the '…' directory. Try building your app with 'text build' before starting the production server.TX018没有 app/ 目录No app/ directory found in ….TX019text run / text mcp 需要 Bun`text …` requires Bun (route files are imported as TypeScript). Install Bun (https://bun.sh) or run `bunx --bun text …`.TX020未知的 CLI 命令Unknown command ….TX028主机被阻止Blocked request. This host (…) is not allowed. Add it to `…` in text.config.ts.TX029未知的 text.config 选项警告Unknown option … in …. It will be ignored.TX030服务端渲染的路由需要持续运行的服务器Server-rendered routes (…) need a long-lived server, which the … adapter does not provide. Use `text build --adapter bun` or `text start`, or remove `export const runtime = "server"`.TX031无效的 dynamic 导出Invalid `dynamic` export … in …. Use "auto", "force-static" or "force-dynamic".
@textjs/opencode
TX021无效的 OpenCode 服务器 URLUse an HTTP(S) server origin without credentials for --target or OPENCODE_SERVER_URL.TX022桥接端口与 OpenCode 冲突The OpenCode server already uses port …. Pick another with --port.TX023桥接程序已在运行Bridge already running at …. Connect to … (or pass --port …).TX024桥接端口已被占用Port … is already in use. Run bunx @textjs/opencode@latest proxy --port … and connect to ….