New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid ERR_INVALID_ARG_TYPE on SIGINT #55605
Comments
This comment was marked as spam.
This comment was marked as spam.
Can confirm and reproduce |
## Fixing a bug ### What? On these versions, SIGINT signals are `string`, exit callback recieves code `number` ### How? We use code argument to quit process for `event`, and exit with code `0` for `SIGINT` and `SIGTERM` signals Fixes #55605 Co-authored-by: Jiachi Liu <4800338+huozhi@users.noreply.github.com>
Same issue here! for me this happens when i |
❌ I get the same error with Node.js v20.3.1. ✅ But with Node.js v18.18.0 the problem does not occur. |
Have you tried the latest version ? https://github.com/vercel/next.js/releases/tag/v13.5.2 |
Ah yes, 13.5.2 fixes it! Thanks @Yovach 🙂 |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Link to the code that reproduces this issue
https://github.com/Yovach/nextjs-sigint
To Reproduce
pnpm dev
Current vs. Expected behavior
Current :
X uncaughtException: TypeError [ERR_INVALID_ARG_TYPE]: The "code" argument must be of type number. Received type string ('SIGINT')
at process.set [as exitCode] (node:internal/bootstrap/node:123:9)
at process.exit (node:internal/process/per_thread:188:24)
at process.cleanup (/home/quentin/labs/reproduction-app/node_modules/.pnpm/next@13.5.1-canary.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/lib/start-server.js:208:29)
at process.emit (node:events:526:35) {
code: 'ERR_INVALID_ARG_TYPE'
}
Following the previous step, the
next dev
server should gracefully stop without error like in13.4.19
Verify canary release
Provide environment information
Which area(s) are affected? (Select all that apply)
CLI (create-next-app)
Additional context
No response
The text was updated successfully, but these errors were encountered: