© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•17mo ago•
3 replies
wolf/gang

How to connect to local sqlite database

I wanted to play around with drizzle and sqlite in a next.js project. But I can’t even create the client like it’s described in the docs:

// page.tsx
import { drizzle } from "drizzle-orm/connect";

const getData = async () => {
  const db = await drizzle("libsql", "file:local.db");
};

export default async function Home() {
  return <div>Hello</div>;
}
// page.tsx
import { drizzle } from "drizzle-orm/connect";

const getData = async () => {
  const db = await drizzle("libsql", "file:local.db");
};

export default async function Home() {
  return <div>Hello</div>;
}


I get the following error:

Module build failed: UnhandledSchemeError: Reading from "bun:sqlite" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "bun:" URIs.


What am I doing wrong here and how can I fix this? It’s very confusing because I’m not even trying to use bun. Thank you!
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Seed local SQLite database from Remote D1 data?
Drizzle TeamDTDrizzle Team / help
11mo ago
How to connect to Oracle database?
Drizzle TeamDTDrizzle Team / help
14mo ago
Drizzle-kit won't connect to local neon database
Drizzle TeamDTDrizzle Team / help
15mo ago
connect to local postgres
Drizzle TeamDTDrizzle Team / help
3y ago