Something went wrong. Try again.
Monorepo for the nibling.run platform
Something went wrong. Try again.
1234567891011121314151617181920// An uncaught error in a worker: the parent's 'error' event, then 'exit' 1.const { Worker, isMainThread } = require("node:worker_threads");
if (isMainThread) { const w = new Worker(__filename); w.on("message", (m) => console.log("message", m)); w.on("error", (e) => { console.log("error", e.constructor.name, e.name, JSON.stringify(e.message), e.code, e instanceof Error); console.log("stack", e.stack.split("\n")[0], e.stack.includes("thread-error.cjs")); }); w.on("exit", (code) => console.log("exit", code));} else { require("node:worker_threads").parentPort.postMessage("before"); setTimeout(() => { const e = new TypeError("bad thing"); e.code = "E_BAD"; throw e; }, 1);}