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.
npm install @errova/sdk-nuxt
1. Register the Module
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
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_SECRETserver-only and set it only when the server DSN isserver_signed. - Use
publicDsnfor 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/sdkimport path. - This package is currently beta tier, so validate your full production flow before rollout.