From 5d03efa1bb230bf1f22cf4a86a20157cd8aca7c4 Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Wed, 3 Jul 2024 06:40:31 +0900 Subject: [PATCH] dev: fix pnpm dev is broken (#14123) * dev: pnpm dev is broken * dev: fix crash pnpm dev because of unhandled promise --- packages/backend/scripts/dev.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/backend/scripts/dev.mjs b/packages/backend/scripts/dev.mjs index 2d0de0f91666..a3e0558abd97 100644 --- a/packages/backend/scripts/dev.mjs +++ b/packages/backend/scripts/dev.mjs @@ -30,6 +30,7 @@ function execStart() { async function killProc() { if (backendProcess) { + backendProcess.catch(() => {}); // backendProcess.kill()によって発生する例外を無視するためにcatch()を呼び出す backendProcess.kill(); await new Promise(resolve => backendProcess.on('exit', resolve)); backendProcess = undefined; @@ -46,6 +47,7 @@ async function killProc() { ], { stdio: [process.stdin, process.stdout, process.stderr, 'ipc'], + serialization: "json", }) .on('message', async (message) => { if (message.type === 'exit') {