这是indexloc提供的服务,不要输入任何密码
Skip to content

I am using a bun run time and getting this error: async_hooks.createHook is not implemented in Bun. Hooks can still be created but will never be called. #2352

@plgrazon

Description

@plgrazon

Please make sure you have searched for information in the following guides.

A screenshot that you have tested with "Try this API".

Image

Has anyone encountered this before?

Repo:

import { Spanner } from "@google-cloud/spanner";

const spanner = new Spanner({
    projectId: "id",
});

console.log("Spanner initialized");

run this file and this will throw that error.

bun version: 1.2.19
google-cloud/spanner: 8.0.0

Link to the code that reproduces this issue. A link to a public Github Repository or gist with a minimal reproduction.

https://gist.github.com/plgrazon/5a6c305520837d07c4456093e1c08262

A step-by-step description of how to reproduce the issue, based on the linked reproduction.

  1. Create a file with this implemenation
  2. Run the file with: bun [file]

A clear and concise description of what the bug is, and what you expected to happen.

Image

Has anyone encountered this before?

Error:
[bun] Warning: async_hooks.createHook is not implemented in Bun. Hooks can still be created but will never be called.

Repo:

import { Spanner } from "@google-cloud/spanner";

const spanner = new Spanner({
    projectId: "id"
});

console.log("Spanner initialized");

run this file and this will throw that error.

bun version: 1.2.19
google-cloud/spanner: 8.0.0

A clear and concise description WHY you expect this behavior, i.e., was it a recent change, there is documentation that points to this behavior, etc. **

This error shouldn't appear, query seems to be working fine though

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: spannerIssues related to the googleapis/nodejs-spanner API.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions