SIGTERM and SIGINT exit codes should be non-zero #62906
Labels
bug
Issue was opened via the bug report template.
create-next-app
Related to our CLI tool for quickly starting a new Next.js application.
locked
Link to the code that reproduces this issue
https://github.com/jaysoo/nx-next-cli-issue
To Reproduce
From the linked repo:
npx nx build
Ctrl+C
)npx nx build
againCurrent vs. Expected behavior
Expected:
Nx re-runs Next CLI
Actual:
Nx reads task from cache, but the
.next
folder is invalid.This happens because the Next CLI exited with
0
in step (2), which tells Nx that the build successfully completed.Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:49 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6020 Available memory (MB): 98304 Available CPU cores: 12 Binaries: Node: 21.7.1 npm: 10.5.0 Yarn: 1.22.22 pnpm: 8.15.7 Relevant Packages: next: 14.2.2 // Latest available version is detected (14.2.2). eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.4.5 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
CLI (create-next-app)
Which stage(s) are affected? (Select all that apply)
next build (local)
Additional context
This can affect other tooling, as demonstrated here with Turborepo that results in a bad cache. https://github.com/jaysoo/next-cli-signals
SIGTERM
can happen in CI and Docker when process times out, or reaches memory limit.The text was updated successfully, but these errors were encountered: