Skip to content

chore(deps): make better-sqlite3 dependency optional #3349

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dannote
Copy link

@dannote dannote commented May 12, 2025

πŸ”— Linked issue

Resolves #3346

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Make better-sqlite3 optional to prevent native‐build failures (e.g. in Bun Docker):

  • Move better-sqlite3 into peerDependencies (marked optional)
  • Add runtime checks so it’s only required when actually used

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Copy link

pkg-pr-new bot commented May 12, 2025

npm i https://pkg.pr.new/@nuxt/content@3349

commit: e217012

@farnabaz
Copy link
Member

Thanks for the PR
Could you merge main into your PR and update the installation docs for each environment? https://content.nuxt.com/docs/getting-started/installation

It would be nice also to have a message to note about moving better-sqlite as an optional dependency.

Ideally, I would be happy if we could prompt the user and ask her permission to install better-sqlite automatically. Just like what Nuxt does for @nuxt/image module if it's missing.

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.

Make better-sqlite3 an optional dependency
2 participants