Skip to content

node:v8 getHeapSpaceStatistics is not yet implemented in Bun #7684

Description

@0x524c

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

Moleculer metrics

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingnode.jsCompatibility with Node.js APIs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions