node:v8 getHeapSpaceStatistics is not yet implemented in Bun
What version of Bun is running?
1.0.18 macOS
What platform is your computer?
ARM64
What steps can reproduce the bug?
My project uses the Moleculer framework. It depends on a node:v8 getHeapSpaceStatistics that does not yet exist in Bun. Is there any chance of this API being developed?
Repo demo https://github.com/524c/moleculer-bun-demo
[2023-12-15T16:15:57.091Z] INFO mac1.local-6540/BROKER: Moleculer v0.14.32 is starting...
[2023-12-15T16:15:57.091Z] INFO mac1.local-6540/BROKER: Namespace: esm
[2023-12-15T16:15:57.091Z] INFO mac1.local-6540/BROKER: Node ID: mac1.local-6540
[2023-12-15T16:15:57.092Z] INFO mac1.local-6540/METRICS: Metrics: Enabled
[2023-12-15T16:15:57.094Z] INFO mac1.local-6540/METRICS: Metric reporter: PrometheusReporter
[2023-12-15T16:15:57.095Z] DEBUG mac1.local-6540/METRICS: Registering common metrics...
[2023-12-15T16:15:57.096Z] DEBUG mac1.local-6540/METRICS: Registered 54 common metrics.
[2023-12-15T16:15:57.096Z] DEBUG mac1.local-6540/METRICS: Update common metric values...
[2023-12-15T16:15:57.096Z] FATAL mac1.local-6540/BROKER: Unable to create ServiceBroker. ::bunternal:: [NotImplementedError]: node:v8 getHeapSpaceStatistics is not yet implemented in Bun.
at new NotImplementedError (internal:shared:13:14)
at <anonymous> (internal:shared:2:35)
at <anonymous> (node:v8:2:23)
at <anonymous> (node:v8:26:37)
at updateCommonMetrics (/Users/rlucas/Desktop/moleculer-bun-demo/node_modules/moleculer/src/metrics/commons.js:314:32)
at init (/Users/rlucas/Desktop/moleculer-bun-demo/node_modules/moleculer/src/metrics/registry.js:33:134)
at new ServiceBroker (/Users/rlucas/Desktop/moleculer-bun-demo/node_modules/moleculer/src/service-broker.js:12:412)
at <anonymous> (/Users/rlucas/Desktop/moleculer-bun-demo/node_modules/moleculer/src/runner-esm.mjs:201:40)
at startBroker (/Users/rlucas/Desktop/moleculer-bun-demo/node_modules/moleculer/src/runner-esm.mjs:196:23)
at processTicksAndRejections (:61:39) {
code: 'ERR_NOT_IMPLEMENTED',
originalLine: 13,
originalColumn: 14
}
What is the expected behavior?
No response
What do you see instead?
No response
Additional information
It's tricky to support most of the node:v8 APIs, since they are usually specific to V8. However, it looks like we could conceivably support this API.
That would be wonderful 🚀🎉
My project consists of a frontend in sveltekit, a backend that depends on Moleculer that runs on Kubernetes and exports Prometheus that depend on this node API.
In development, I already migrated everything to run with Bun, but in production I only got the Frontend due to the lack of this nodejs API. That's all it takes to migrate 100%.
any updates?
any updates?
any updates?
any updates?
any updates?
any updates?
Any updates? Thanks 😄