Nuxt Setup

Set up the Nuxt SDK module, configure server and browser DSNs, and use the Nuxt-native composable for manual capture.

Use @errova/sdk-nuxt in Nuxt 3 apps. The module initializes browser and server runtimes, hooks into Nuxt and Nitro error paths, and exposes useErrova() for manual capture.

Bash
npm install @errova/sdk-nuxt

1. Register the Module

TypeScript
export default defineNuxtConfig({
modules: ["@errova/sdk-nuxt"],
errovaSdk: {
dsn: process.env.ERROVA_DSN ?? "",
publicDsn: process.env.NUXT_PUBLIC_ERROVA_SDK_DSN ?? "",
dsnSecret: process.env.ERROVA_DSN_SECRET || undefined,
environment: process.env.NODE_ENV ?? "development",
release: process.env.APP_VERSION,
debug: false,
autoCapture: true,
},
})

2. Capture Errors Manually When You Need More Context

TypeScript
export default defineEventHandler(() => {
const errova = useErrova()
errova.captureMessage("Nuxt server route reached", "info")
try {
throw new Error("Nuxt route failure")
} catch (error) {
errova.captureException(error, {
tags: {
feature: "server-route",
},
})
}
return { ok: true }
})

Important Notes

  • Keep ERROVA_DSN_SECRET server-only and set it only when the server DSN is server_signed.
  • Use publicDsn for browser capture. When a secret is present, the module does not copy the private server DSN into public runtime config by default.
  • Use useErrova() instead of the removed @errova/sdk-nuxt/sdk import path.
  • This package is currently beta tier, so validate your full production flow before rollout.