Is better-sqlite3 required with Nuxt Content?

I am using Nuxt Content with Nuxt 4 and when I run the dev environment, I am being prompted to also install the better-sqlite3 dependency, is it required with Nuxt Content if I am only going to be using markdown files in the content folder?
2 Replies
kapa.ai
kapa.ai2mo ago
Hi @Sagar Kapoor. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- No, better-sqlite3 is not strictly required for Nuxt Content, but it is the default SQLite adapter when running in a Node.js environment. Nuxt Content uses a local SQLite database to store and query your content—even if you are only using markdown files in your content folder. When you run your project, Nuxt Content will prompt you to install either better-sqlite3 or sqlite3 as the database connector, unless you are using Node.js v22.5.0 or newer, which supports native SQLite via the experimental.nativeSqlite option. If you do not want to install any external SQLite package, you can enable native SQLite support in your nuxt.config.ts like this (only available in Node.js v22.5.0+):
export default defineNuxtConfig({
content: {
experimental: { nativeSqlite: true },
},
});
export default defineNuxtConfig({
content: {
experimental: { nativeSqlite: true },
},
});
See details in the documentation. So, while better-sqlite3 is not absolutely required, you do need some form of SQLite support (either better-sqlite3, sqlite3, or native Node.js SQLite) for Nuxt Content to function—even if you are only using markdown files in your content folder. This is because Nuxt Content v3+ uses an SQL-based storage layer for all content, not just for advanced use cases Installation Database configuration. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2mo ago
<@565461230060306432> Kapa.ai is still learning and improving, please let me know how I did by reacting below.

Did you find this page helpful?