drizzle-team / drizzle-team/drizzle-orm
[BUG]: Cloudflare Durable Objects with Vite: Rollup Error
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### Report hasn't been filed before.
- [x] I have verified that the bug I'm about to report hasn't been filed before.
### What version of `drizzle-orm` are you using?
0.43.1
### What version of `drizzle-kit` are you using?
0.31.1
### Other packages
vite@6.3.5
### Describe the Bug
I followed the steps here. https://orm.drizzle.team/docs/get-started/do-new
I used it before to create an app. But now that Cloudflare ships applications with Vite, I started a new project, so I suspect would that be a Vite related error? I created a React app which has worker folder.
I got this error:
```
11:20:57 PM [vite] Internal server error: RollupError: Parse failure: Expected ';', '}' or
At file: /worker/drizzle/0000_common_red_wolf.sql:1:8
at async ProxyServer.fetch (file:///Users/mustafa/projects/tmp-project/node_modules/miniflare/src/workers/core/proxy.worker.ts:173:11)
```
Related files:
```jsonc
"rules": [
{
"type": "Text",
"globs": [
"**/*.sql"
],
"fallthrough": true
}
],
```
```
import 'dotenv/config';
import { defineConfig } from 'drizzle-kit';
export default defineConfig({
out: './worker/drizzle',
schema: './worker/db/schema.ts',
dialect: 'sqlite',
driver: 'durable-sqlite',
});
```
Contributor guide
Assessment
This issue has not been assessed yet.