錯誤代碼
每個 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 伺服器網址Use 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 ….