Skip to content

fix(db): use libsql in dev mode when cloudflare preset is set#775

Merged
atinux merged 1 commit intonuxt-hub:mainfrom
onmax:fix/devtools-db-local-dev
Jan 22, 2026
Merged

fix(db): use libsql in dev mode when cloudflare preset is set#775
atinux merged 1 commit intonuxt-hub:mainfrom
onmax:fix/devtools-db-local-dev

Conversation

@onmax
Copy link
Copy Markdown
Contributor

@onmax onmax commented Jan 10, 2026

Closes #772

Summary

When NITRO_PRESET=cloudflare-pages is set, D1 driver was selected in dev mode causing DevTools Database panel to fail. Fix uses libsql driver in dev mode (D1 only for production).

StackBlitz

Link Expected
Bug hub-772 ❌ DevTools → Database → Launch fails
Fix hub-772-fixed ✅ Drizzle Studio opens

CLI Reproduction

git clone --depth 1 --filter=blob:none --sparse https://github.com/onmax/repros.git
cd repros && git sparse-checkout set hub-772
cd hub-772 && pnpm i && pnpm dev
# Open DevTools → Database → Launch → Error

Verify fix

git sparse-checkout add hub-772-fixed
cd ../hub-772-fixed && pnpm i && pnpm dev
# Open DevTools → Database → Launch → Works

The -fixed folder uses pnpm patch to apply the fix locally.

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 10, 2026

@onmax is attempting to deploy a commit to the NuxtLabs Team on Vercel.

A member of the Team first needs to authorize it.

@onmax onmax force-pushed the fix/devtools-db-local-dev branch 2 times, most recently from 3a96918 to 7cd6cac Compare January 10, 2026 22:32
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Jan 10, 2026

npm i https://pkg.pr.new/@nuxthub/core@775

commit: 3bf14de

@onmax onmax marked this pull request as draft January 11, 2026 09:05
@onmax onmax marked this pull request as ready for review January 19, 2026 13:08
@onmax onmax force-pushed the fix/devtools-db-local-dev branch 2 times, most recently from a05e344 to cfe6f29 Compare January 19, 2026 13:25
Copy link
Copy Markdown
Member

@RihanArfan RihanArfan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! 💚 I'm checking with the Drizzle team to see if we can support D1 via binding with startStudioSQLiteServer(). Hopefully this means we can continue to support D1 during dev so the DB matches prod. Launching would be the same as how we do PGlite. If not then we can switch the default sqlite db type to always be libsql during dev.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't need to reverse proxy local.dizzle.studio. Nuxt DevTools v3.11 or newer allows passing permissions to the iframe. I've made commit 4f11aae which adds it to v0.10 embed. The browser should then prompt for a permission to access the local network after launching.

Image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though I still cannot make it work in Arc :(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though I still cannot make it work in Arc :(

@atinux
Copy link
Copy Markdown
Contributor

atinux commented Jan 21, 2026

Could you please resolve the conflicts @onmax ?

@onmax onmax force-pushed the fix/devtools-db-local-dev branch from cfe6f29 to 47c26ef Compare January 21, 2026 11:10
@onmax onmax force-pushed the fix/devtools-db-local-dev branch from 47c26ef to 3bf14de Compare January 21, 2026 11:15
@onmax
Copy link
Copy Markdown
Contributor Author

onmax commented Jan 21, 2026

conflicts resolved

@atinux atinux merged commit 2d84b1c into nuxt-hub:main Jan 22, 2026
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Question] DevTools integration lost in v0.10? Database and Blob panels not working with SQLite (D1)

3 participants