next-compile

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Check Next.js compilation errors

检查Next.js编译错误

MANDATORY: after any
Edit
/
Write
, run step 2 before telling the user the change is done. Never run
next build
. Turbopack only — the script bails on webpack.
  1. Find the port of a running
    next dev
    — check listening processes. If you can't find it, ask the user.
  2. Run:
    bash
    node ./scripts/check.mjs <port>
  3. Fix actionable errors. Ignore noise or pre-existing unrelated failures.
  4. Only report the edit complete once step 2 returns clean (or only pre-existing failures).
必须执行:在任何
Edit
/
Write
操作后,告知用户修改完成前请先执行步骤2。切勿运行
next build
。仅支持Turbopack——若使用webpack,脚本会终止运行。
  1. 找到运行中
    next dev
    的端口——查看监听进程。如果无法找到,请询问用户。
  2. 运行以下命令:
    bash
    node ./scripts/check.mjs <port>
  3. 修复可处理的错误。忽略无关的干扰信息或预先存在的无关失败。
  4. 仅当步骤2返回无错误(或仅存在预先存在的失败)时,才可报告编辑完成。