Skip to content

Commit

Permalink
fix: ignore plugin process kill errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pieh committed Dec 10, 2024
1 parent ef92c48 commit 0240ac4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/build/src/plugins/spawn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,5 +217,11 @@ const stopPlugin = async function ({
})
childProcess.disconnect()
}
childProcess.kill()
try {
childProcess.kill()
} catch {
// In Node 22, there's a bug where attempting to kill a child process
// results in an EPERM error. Ignore the error in that case.
// See: https://github.com/nodejs/node/issues/51766
}
}

0 comments on commit 0240ac4

Please sign in to comment.