nuxt-community / sentry-module

Sentry module for Nuxt 2
https://sentry.nuxtjs.org
MIT License
501 stars 114 forks source link

FATAL WebpackPlugin is not a constructor error #599

Closed alexbuckham closed 1 year ago

alexbuckham commented 1 year ago

Version

@nuxtjs/sentry: 7.3.1 nuxt: 2.17.0 @sentry/webpack-plugin: ^2.4.0

Sentry configuration

    dsn: '',
    publishRelease: {
      authToken: process.env.SENTRY_TOKEN,
      org: '',
      project: '',
    },
  },

Reproduction Link

Running nuxt generate results in a FATAL error

FATAL  WebpackPlugin is not a constructor                                                                                                                                                                                                                       

  at webpackConfigHook (node_modules/@nuxtjs/sentry/dist/module.mjs:538:23)
  at async Nuxt.callHook (node_modules/hable/dist/hable.js:1:959)
  at async WebpackBundler.build (node_modules/@nuxt/webpack/dist/webpack.js:1804:5)
  at async Builder.build (node_modules/@nuxt/builder/dist/builder.js:249:5)
  at async ensureBuild (node_modules/@nuxt/cli/dist/cli-generate.js:117:3)
  at async Object.run (node_modules/@nuxt/cli/dist/cli-generate.js:234:7)
  at async NuxtCommand.run (node_modules/@nuxt/cli/dist/cli-index.js:356:7)

Steps to reproduce

run nuxt generate

rchl commented 1 year ago

You have to install v1 of @sentry/webpack-plugin. v2 is not yet supported.

alexbuckham commented 1 year ago

Ah, thanks @rchl!