Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Node-API function "napi_type_tag_object" is not implemented yet. #2221

Closed
Quark03 opened this issue Apr 28, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@Quark03
Copy link

Quark03 commented Apr 28, 2024

What version of drizzle-orm are you using?

0.30.9

What version of drizzle-kit are you using?

0.20.17

Describe the Bug

When I call a query in a dynamic imported module I get this error:

warning: Node-API function "napi_type_tag_object" is not implemented yet.
 Track the status of Node-API in Bun: https://github.com/oven-sh/bun/issues/158
thread '<unnamed>' panicked at /cargo/registry/src/index.crates.io-6f17d22bba15001f/neon-1.0.0/src/sys/tag.rs:120:5:
assertion `left == right` failed
  left: GenericFailure
 right: Ok
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: script "dev" was terminated by signal SIGABRT (Abort)
[1]    3284 abort      bun dev

If I comment the query and the drizzle imports there is no error so the error is coming from drizzle

Expected behavior

I guess drizzle fully supports the bun runtime so I was hoping for the query to execute normally

Environment & setup

Bun: 1.1.3
Ubuntu 20.04 (WSL)
Typescript: ^5.0.0
My db/index.ts drizzle initialization:

import { drizzle } from 'drizzle-orm/libsql';
import { createClient } from '@libsql/client';

const client = createClient({ url: Bun.env.DATABASE_URL || "file:local.db", authToken: Bun.env.DATABASE_AUTH_TOKEN });

export const db = drizzle(client);

My db/schema.ts

import { sql } from "drizzle-orm";
import { text, integer, sqliteTable } from "drizzle-orm/sqlite-core";

export const ticketsTable = sqliteTable('tickets', {
	/* The table code in here */
});
@Quark03 Quark03 added the bug Something isn't working label Apr 28, 2024
@Jarred-Sumner
Copy link

This one is a bug in Bun.

@Quark03 Quark03 closed this as completed Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants