Commit 172256a
authored
fix(react-cra): handle drizzle + better-sqlite3 driver error caused by DATABASE_URL prefix (#210)
fix(tanstack-start): handle better-sqlite3 driver error caused by DATABASE_URL prefix
The TanStack Start app fails to initialize when using the drizzle + sqlite add-on with the following error:
Cannot open database because the directory does not exist
This happens because the generated `DATABASE_URL` is set to `file:./dev.db`, but the `better-sqlite3` driver
does not support the `file:` prefix. This commit removes that prefix and sets `DATABASE_URL` to `dev.db`
to ensure the app starts correctly.1 parent 7a8082c commit 172256a
File tree
2 files changed
+2
-2
lines changed- frameworks/react-cra
- add-ons/drizzle/assets
- src
2 files changed
+2
-2
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
0 commit comments