Description
When running Sidequest under Bun instead of Node.js, the worker process crashes immediately with a Not implemented error from Piscina.
This happens because Piscina internally uses Node’s perf_hooks.monitorEventLoopDelay / createHistogram, which are not implemented in Bun’s Node-compatibility layer. As a result, Sidequest cannot currently be used in a Bun runtime.
Error log
[info] [2025-08-18 14:51:46] [Sidequest] [Worker] : Starting worker with provided configuration...
[error] [2025-08-18 14:51:46] [Sidequest] [Worker] : Not implemented
Error: Not implemented
at unknown
at new PiscinaHistogramHandler (.../node_modules/piscina/dist/histogram.js:21:94)
at new ThreadPool (.../node_modules/piscina/dist/index.js:94:30)
at new Piscina (.../node_modules/piscina/dist/index.js:622:57)
at new RunnerPool (.../node_modules/@sidequest/engine/dist/shared-runner/runner-pool.js:18:25)
at new ExecutorManager (.../node_modules/@sidequest/engine/dist/execution/executor-manager.js:25:31)
at <anonymous> (.../node_modules/@sidequest/engine/dist/workers/main.js:25:151)
Steps to reproduce
- Install Sidequest in a Bun project
- Call
Sidequest.start() in Bun runtime
- Worker crashes before starting
Expected behavior
Sidequest should either:
Actual behavior
Worker immediately crashes with PiscinaHistogramHandler: Not implemented.
Environment
- Sidequest version:
@sidequest/engine@x.x.x (please fill exact version)
- Bun version:
1.1.x
Description
When running Sidequest under Bun instead of Node.js, the worker process crashes immediately with a
Not implementederror from Piscina.This happens because Piscina internally uses Node’s
perf_hooks.monitorEventLoopDelay/createHistogram, which are not implemented in Bun’s Node-compatibility layer. As a result, Sidequest cannot currently be used in a Bun runtime.Error log
Steps to reproduce
Sidequest.start()in Bun runtimeExpected behavior
Sidequest should either:
Actual behavior
Worker immediately crashes with
PiscinaHistogramHandler: Not implemented.Environment
@sidequest/engine@x.x.x(please fill exact version)1.1.x