-
Notifications
You must be signed in to change notification settings - Fork 111
Description
Version
@nuxtjs/sentry: 8.0.8
nuxt: 2.17.3
Sentry configuration
dsn: <dsn>,
disabled: false,
config: {
environment: process.env.ENV,
release: process.env.npm_package_version,
autoSessionTracking: false,
debug: false,
attachStacktrace: true
},
publishRelease: isDevelopmentMode ? false : {
authToken: process.env.SENTRY_AUTH_TOKEN,
url: <url>,
org: <org>,
project: <project>,
debug: true,
sourcemaps: {
assets: [`./dist/**/*`],
ignore: ['./node_modules/**']
}
},
Reproduction Link
Steps to reproduce
Run npm run generate in the reproduction project
What is Expected?
Sourcemaps are uploaded to Sentry
What is actually happening?
Sentry appears to be trying to upload sourcemaps before the nuxt generate command completes. We use Github Actions to build the app. Here's the GA output:
[success] [nuxt:sentry] Sentry reporting is enabled (client side: enabled, server side: enabled)
[info] Production build
[info] Bundling only for client side
[info] Target: static
[success] Builder initialized
[success] Nuxt files generated
Error: [BABEL] Note: The code generator has deoptimised the styling of /runner/_work/<thing>/<thing>/services/<api>/<sdk>/api.ts as it exceeds the max of 500KB.
[log] [sentry-webpack-plugin] Warning: Didn't find any matching sources for debug ID upload. Please check the `sourcemaps.assets` option.
[success] [nuxt:sentry] Sentry reporting is enabled (client side: enabled, server side: enabled)
[info] Generating output directory: dist/
[info] Generating pages
[success] Generated route "/"
[success] Client-side fallback created: `200.html`
> <project>@<version> generate-sitemap
> node ./pipeline/sitemap-gen.js
fetching current sitemap.xml
fetching published product ids...
generating sitemap.xml
done
As you can see, the webpack plugin does not does not find the sources, which I believe is because the generate command hasn't finished building yet. I added a few echo statements in the command on the first line to be sure (removed here). Have I configured something incorrectly? This is part of an upgrade from the 1.x version of the plugin, and sourcemap upload seemed to work before.
Additionally, the command works locally on my machine. The build generates all files and sourcemaps, and uploads correctly to Sentry once the build completes. I'm unsure why the same command would work locally, but fail in Github Actions. Any help would be appreciated, thank you.
I thought perhaps this was a webpack problem and asked in the webpack plugin project, but was redirected over here.