Skip to content
Sentry module for NuxtJS
Branch: master
Clone or download
Latest commit fa2b2ee Apr 2, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github chore: update (#62) Mar 8, 2019
lib chore: housekeeping Apr 2, 2019
test chore: housekeeping Apr 2, 2019
.editorconfig Initial commit. Oct 17, 2017
.eslintrc chore: housekeeping Apr 2, 2019
.gitignore Initial commit. Oct 17, 2017 chore(release): 2.3.2 Apr 2, 2019
LICENSE fix: fix module options (#59) Apr 2, 2019
renovate.json chore: update linter Apr 2, 2019
yarn.lock add standard-version dependency Apr 2, 2019


npm (scoped with tag) npm Dependencies js-standard-style

Sentry module for Nuxt.js


The module enables error logging through Sentry.

  • Please note that version 2.2.0 of this package removed the older public_key and private_key options, since the updated Sentry packages don't support these anymore.
  • Please note that version 2.0.0 of this package introduces a breaking change. See #30 for more information.


  • Add @nuxtjs/sentry dependency using yarn or npm to your project
  • Add @nuxtjs/sentry to modules section of nuxt.config.js
  modules: [

  sentry: {
    dsn: '', // Enter your project's DSN here
    config: {}, // Additional config

Nuxt compatibility

Versions of NuxtJS between v1.0.0 and v1.2.1 are not supported by this package.


Enter your DSN in the NuxtJS config file. Additional config settings can be found here.

Usage in Vue component

In a Vue component, Sentry is available as this.$sentry, so we can call functions like

this.$sentry.captureException(new Error('example'))

where this is a Vue instance.


Options can be passed using either environment variables or sentry section in nuxt.config.js. Normally setting required DSN information would be enough.


  • Type: String
    • Default: process.env.SENTRY_DSN || false
    • If no dsn is provided, Sentry will be initialised, but errors will not be logged. See #47 for more information about this.


  • Type: Boolean
    • Default: process.env.SENTRY_DISABLED || false
    • Sentry will not be initialised if set to true.


  • Type: Boolean
    • Default: process.env.SENTRY_DISABLE_CLIENT_SIDE || false



  • Type: Object
    • Default: {}

Submitting releases to Sentry

Support for the sentry-webpack-plugin was introduced #a6cd8d3. This can be used to send releases to Sentry. Use the publishRelease option to enable this feature.

Note that releases are only submitted to Sentry when (options.publishRelease && !isDev) is true.


MIT License

Copyright (c) Diederik van den Burger

You can’t perform that action at this time.