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).
- 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.

```
○ 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
Assessment
This issue has not been assessed yet.