-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
Description
Bug report
This is a bug report + a workaround that can help someone who will experience same issue like me.
Describe the bug
https://github.com/zeit/next.js/blob/master/bin/next#L78
Dev server is closed with code 1 on SIGTERM. For example this breaks jest-puppeteer (which use jest-dev-server): it kills the server process after all tests are done.
To Reproduce
The following simple jest-puppeteer.config.js may be used:
module.exports = {
server: {
command: 'npm start',
port: 3000,
launchTimeout: 30000
}
};Expected behavior
Process should exit with 0 code on SIGTERM. Not sure why SIGTERM results in 1 error code, that's not an error, it's just a termination, so if it is successfully terminated 0 code is fine.
Workaround
Working workaround :) — put || exit 0 or || true in package.json:
{
"scripts": {
"start": "next || exit 0"
}
}
Does not work:
module.exports = {
server: {
command: 'npm start || exit 0'
}
};Metadata
Metadata
Assignees
Labels
No labels