TX019

text run / text mcp 需要 Bun

控制台

Text.js error TX019: `text …` requires Bun (route files are imported as TypeScript). Install Bun (https://bun.sh) or run `bunx --bun text …`.

发生原因

text run 和 text mcp 直接导入 .tsx 路由文件,这需要 Bun 的原生 TypeScript 加载器。使用 Node 启动时,如果 PATH 中有 bun,CLI 会使用 Bun 重新运行自身;此错误表示未找到 bun。

修复方法

安装 Bun,或直接使用 Bun 运行命令:

bunx --bun text runbunx --bun text mcp

text dev、text build 和 text start 可在 Node 上运行。