JulianMar / nuxt-bugsnag

Bugsnag module for nuxt.js
MIT License
49 stars 18 forks source link

Source maps not working with Nuxt 2.15 #25

Closed Matiyeu closed 2 years ago

Matiyeu commented 3 years ago

I get an infinite loop on the source maps upload when I do the build with nuxt build

 {
    apiKey: process.env.BUGSNAG_APIKEY,
    publishRelease: true,
    reporterOptions: {
      appVersion: pkg.version,
      releaseStage: process.env.MODE, <= 'production'
      enabledReleaseStages: ['staging', 'production'],
      autoAssignRelease: true,
    }
  }

nuxt: 2.15.4 nuxt-bugsnag: 4.2.2

JulianMar commented 3 years ago

Hmm weird issue. Can you maybe try to change from reporterOptions to config.
looks like not every option you pass is valid for the options object. Here is a list of options.
In particular I think the enabledReleaseStages, is causing problems.

Would be very cool if you can attach a working reproduction of the issue!

Matiyeu commented 3 years ago

It works with version 2.14 of Nuxt. The enabledReleaseStages variable is staging or production as in the doc

JulianMar commented 3 years ago

Did you try changing to config?

Matiyeu commented 3 years ago

Yes it does not work

JulianMar commented 3 years ago

I used your config and it works for me. Do you see some logs like this:

[BugsnagSourceMapUploaderPlugin] uploading sourcemap for "*/517df50.js"                                                                                                                                                                        18:14:07
[BugsnagSourceMapUploaderPlugin] uploading sourcemap for "*/a75f891.js"                                                                                                                                                                        18:14:07
[BugsnagSourceMapUploaderPlugin] uploading sourcemap for "*/cbb6e43.js"                                                                                                                                                                        18:14:07
[BugsnagSourceMapUploaderPlugin] uploading sourcemap for "*/fb566a3.js"                                                                                                                                                                        18:14:07
[BugsnagSourceMapUploaderPlugin] uploading sourcemap for "*/729ae27.js"                                                                                                                                                                        18:14:07
[BugsnagSourceMapUploaderPlugin] uploading sourcemap for "*/56515c8.js"     
Matiyeu commented 3 years ago

Yes infinite log like that

JulianMar commented 3 years ago

Check your bugsnag project settings and source maps, are they in there? If yes it is working

Matiyeu commented 3 years ago

The build never ends when I run yarn build

JulianMar commented 3 years ago

Okay, do you maybe use corejs 2?
If not can you try DEBUG=nuxt:* yarn build and check the output maybe you see some errors

JulianMar commented 3 years ago

or can you paste your nuxt.config.js file