( stopped: string, fails: "throws" | "exits" )
| 44 | ].map(match => match[1]) |
| 45 | |
| 46 | export const writeStoppedMessage = ( |
| 47 | stopped: string, |
| 48 | fails: "throws" | "exits" |
| 49 | ): string => { |
| 50 | const preloads = nodeOptionPreloads() |
| 51 | return `@ark/aot's precompiler ${stopped} before it answered, as it does where a module the process preloads ${fails} in a worker thread${preloads.length ? `, like ${preloads.join(" or ")}, which NODE_OPTIONS loads` : ""}. Pass it to node as a flag instead, as \`node --import ${preloads[0] ?? "./setup.ts"}\`, which keeps it out of the precompiler's thread, or return from it early where \`isMainThread\` from node:worker_threads is false. To see its error and stack, run \`node -e 'new (require("node:worker_threads").Worker)(new URL("data:text/javascript,"))'\` with the same NODE_OPTIONS.` |
| 52 | } |
| 53 | |
| 54 | const waiting = 0 |
| 55 | const answered = 1 |
no test coverage detected