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]: running generate:sqlite with bun find no tables on my schema #1786

Closed
brunoti opened this issue Jan 11, 2024 · 2 comments
Closed

[BUG]: running generate:sqlite with bun find no tables on my schema #1786

brunoti opened this issue Jan 11, 2024 · 2 comments
Labels
bug Something isn't working drizzle/kit

Comments

@brunoti
Copy link

brunoti commented Jan 11, 2024

What version of drizzle-orm are you using?

0.29.3

What version of drizzle-kit are you using?

0.20.10

Describe the Bug

When drizzle kit is run with Bun it can't find my tables.

Bun version: 1.0.21

I have started this new svelte kit project to try out drizzle.

Here is the repo: https://github.com/brunoti/habit-tracker

I'm using Turso. When running drizzle-kit with Bun I first got Bun is undefined then I used bun --bun and it simply can't find the tables. When run with pnpm the tables are found and the migration is generated.

Does anyone know why?

CleanShot.2024-01-11.at.09.25.41.mp4

Expected behavior

Run the same way it does with node.

Environment & setup

image

@brunoti brunoti added the bug Something isn't working label Jan 11, 2024
@brunoti brunoti changed the title [BUG]: [BUG]: running generate:sqlite with bun find no tables on my schema Jan 11, 2024
@PatNei
Copy link

PatNei commented Feb 15, 2024

I have the same issue but the problem disappeared when i removed the --bun flag.

@etienne-napoleone
Copy link

etienne-napoleone commented Apr 14, 2024

EDIT: It works after installing node alongside

Having the same issue on macOs only. This is working on WSL (ubuntu).

❯ bun db:g                       
$ drizzle-kit generate:sqlite
drizzle-kit: v0.20.14
drizzle-orm: v0.30.8

No config path provided, using default 'drizzle.config.ts'
Reading config file '/Users/.../drizzle.config.ts'
0 tables


No schema changes, nothing to migrate 😴
❯ bun run drizzle-kit --version
drizzle-kit: v0.20.14
drizzle-orm: v0.30.8

config:

import type { Config } from "drizzle-kit";

export default {
  schema: "./db/schema.ts",
  out: "./db/migrations",
  driver: "better-sqlite",
  dbCredentials: {
    url: "./database.db",
  },
} satisfies Config;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working drizzle/kit
Projects
None yet
Development

No branches or pull requests

5 participants