bun-nuxt

Configures and runs Nuxt 3 applications on the Bun runtime with Nitro presets.

Updated Jun 22, 2026
One-click install
npx skills add https://github.com/aicodepro/ai-agent-nexi --skill bun-nuxt-aicodepro
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bun-nuxt
Source: https://github.com/aicodepro/ai-agent-nexi/tree/main/agent/skills/bun-nuxt
Command: npx skills add https://github.com/aicodepro/ai-agent-nexi --skill bun-nuxt-aicodepro

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires nuxt, vue, and includes references (resource) components.

What problem does it solve? Setting up Nuxt 3 projects to run on the Bun runtime involves non-obvious configuration across package.json scripts, Nitro presets, and server code, and mistakes cause errors like missing bun:sqlite modules or failed production builds. ## Core Features & Use Cases - Project Scaffolding and Scripts: Initialize Nuxt apps with bunx nuxi, configure dev/build/preview scripts, and force the Bun runtime with bun --bun. - Nitro Bun Preset Configuration: Set nitro.preset to bun, externalize Bun-native modules, and build production servers runnable via bun .output/server/index.mjs. - Bun-Native Server Code: Use bun:sqlite databases, Bun.file APIs, H3 event handlers, Nitro plugins, and scheduled tasks inside Nuxt server routes. - Use Case: A developer building a Vue/Nuxt app who wants faster installs and a single-runtime stack can follow this Skill to configure the project, write server API routes backed by bun:sqlite, and deploy with a Bun-based Dockerfile. ## Quick Start Ask the assistant to scaffold a new Nuxt 3 project configured to run on the Bun runtime with the Nitro bun preset and a sample bun:sqlite API route.

Frequently Asked Questions about bun-nuxt

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a Nuxt 3 app with the Bun runtime?

Run Nuxt with Bun by prefixing scripts with bun --bun, for example bun --bun nuxt dev and bun --bun nuxt build. For production, set the Nitro preset to bun and start the server with bun .output/server/index.mjs.

How to use bun:sqlite in Nuxt server routes?

Import Database from bun:sqlite inside a Nitro server route or utility, then run queries with db.query(...).all(). Set nitro.preset to bun and add bun:sqlite to nitro.externals.external so the build does not try to bundle it.

Why does Nuxt build fail with Cannot find bun:sqlite?

This error means the Nitro preset is not set to bun, so the build targets Node and cannot resolve Bun-native modules. Set nitro.preset to "bun" in nuxt.config.ts or build with NITRO_PRESET=bun.

Can I deploy a Bun-powered Nuxt app with Docker?

Yes, use a multi-stage Dockerfile based on oven/bun: install dependencies with bun install --frozen-lockfile, run bun run build, then copy the .output directory and start with bun .output/server/index.mjs on port 3000.

How do I secure bun install against malicious packages?

Bun blocks post-install scripts by default; allow specific ones via trustedDependencies in package.json. Additionally set minimumReleaseAge in bunfig.toml for a cooldown period and audit packages with the Socket CLI before installing.