diff --git a/packages/typescript/internal/worker/worker_adapter.js b/packages/typescript/internal/worker/worker_adapter.js index 88a95fe90d..5755bd5f48 100644 --- a/packages/typescript/internal/worker/worker_adapter.js +++ b/packages/typescript/internal/worker/worker_adapter.js @@ -61,7 +61,17 @@ async function main() { `Started a new process to perform this action. Your build might be misconfigured, try --strategy=${MNEMONIC}=worker`); - child.on('exit', code => process.exit(code)); + child.on('exit', code => { + if (code !== 0) { + console.error( + `\nStdout from tsc worker:\n\n ${child.stdout.toString().replace(/\n/g, '\n ')}`, + ) + console.error( + `\nStderr from tsc worker:\n\n ${child.stderr.toString().replace(/\n/g, '\n ')}`, + ) + } + process.exit(code) + }); } }