Setup

Check the Nuxt.js documentation for more information about installing and using modules in Nuxt.js.

Nuxt.js v2.4.0+ is required, earlier versions are not supported

Installation

Add @nuxtjs/sentry dependency to your project:

yarn add @nuxtjs/sentry
npm install @nuxtjs/sentry

Then, add @nuxtjs/sentry to the modules section of nuxt.config.js:

nuxt.config.js
{
  modules: [
    '@nuxtjs/sentry'
  ],
  sentry: {
    dsn: '', // Enter your project's DSN here
    // Additional Module Options go here
    // https://sentry.nuxtjs.org/sentry/options
    config: {
      // Add native Sentry config here
      // https://docs.sentry.io/platforms/javascript/guides/vue/configuration/options/
    },
  }
}

Types

For typescript projects, add @nuxtjs/sentry to tsconfig types array

tsconfig.json
{
  "compilerOptions": {
    "types": [
      "@nuxtjs/sentry"
    ]
  }
}

Configuration

See Options for a list of available options

Edit this page on GitHub Updated at Thu, Jun 3, 2021