drizzle-team / drizzle-team/drizzle-orm

[BUG]: (v0.33.0-ad58316 to 0.34.0-f5f3e49) - Module build failed: UnhandledSchemeError: Reading from "bun:sqlite" is not handled by plugins (Unhandled scheme).

Open
#3,016 3 comments 10 reactions 0 assignees View on GitHub
bug priority
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### What version of `drizzle-orm` are you using?

0.34.0-f5f3e49

### What version of `drizzle-kit` are you using?

0.25.0-f5f3e49

### Describe the Bug

Ran into this issue after wanting to test the [alleged default(boolean) fix from three days ago. ](https://github.com/drizzle-team/drizzle-orm/issues/2559#issuecomment-2373442756)

A breaking change seems to have been pushed since **drizzle-orm 0.33.0-ad58316** _(23 days ago)_, which seems to kill webpack builds due to something forcing the need for bun. This issue has persisted from that point forwards all the way to **0.34.0-f5f3e49** _(3 days ago)_. This includes beta build - and happens after local server is started with pnpm run dev, and compiling is attempted.

As far as I can tell, it would cause any project which doesn't utilize bun to fail compile/build, as according to the errors, the compiling/build process attempts to handle bun URIs. This breaks my regular nextjs 15 project with standard webpack config (no custom) and uses pnpm.
![image](https://github.com/user-attachments/assets/8c245f0e-788b-4e5a-aa6a-65287a9ebf7d)

```
○ Compiling /documents/[blog] ...
⨯ bun:sqlite
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.
Import trace for requested module:
bun:sqlite
./node_modules/.pnpm/drizzle-orm@0.34.0-f5f3e49_@neondatabase+serverless@0.9.5_@types+pg@8.11.6_@types+react@18.3._zur7dzgdmydyxljhcfswj3cnqq/node_modules/drizzle-orm/monodriver.js
./node_modules/.pnpm/drizzle-orm@0.34.0-f5f3e49_@neondatabase+serverless@0.9.5_@types+pg@8.11.6_@types+react@18.3._zur7dzgdmydyxljhcfswj3cnqq/node_modules/drizzle-orm/index.js
```

### Expected behavior

I would expect local compiling/build process to pass after running "pnpm run dev".
This error does no occur on version 0.33.0-daeed1e and earlier.

### Environment & setup

Standard out of the box webpack config on Nextjs 15. Using pnpm - no bun.

**next:** 15.0.0-canary.171
**react":** 19.0.0-rc-5d19e1c8-20240923
**react-dom:** 19.0.0-rc-5d19e1c8-20240923

**drizzle-kit:** 0.25.0-f5f3e49
**drizzle-orm:** 0.34.0-f5f3e49

(affects all drizzle-orm versions since drizzle-orm 0.33.0-ad58316)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.