Skip to content

Problem with Nuxt source maps generation #15160

Closed
@adiantek

Description

@adiantek

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nuxt

SDK Version

8.51.0

Framework Version

Nuxt 3.15.2

Link to Sentry event

No response

Reproduction Example/SDK Setup

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  compatibilityDate: '2024-11-01',
  devtools: { enabled: true },
  modules: ['@sentry/nuxt/module'],

  sentry: {
    sourceMapsUploadOptions: {
      org: 'adiantek',
      project: 'projectname',
      sourcemaps: {
        assets: ['./.output/public/**/*'],
        filesToDeleteAfterUpload: ['./.output/public/**/*.map']
      }
    }
  },

  sourcemap: {
    client: 'hidden'
  }
})

Steps to Reproduce

  1. npx nuxi@latest init projectname
  2. cd projectname
  3. npx nuxi@latest init projectname
  4. Modify config nuxt.config.ts to upload only generated .map (code from SDK Setup)
  5. npm run generate

Expected Result

Source maps from generated page should be uploaded. Sentry/nuxt uploads only from nuxt-server. sentry-rollup-plugin trying to upload source maps before Prerendering 3 initial routes with crawler.

Actual Result

> generate
> nuxt generate

Nuxt 3.15.2 with Nitro 2.10.4                                                                                                                                               nuxi 00:51:16
[Sentry] Enabled source map generation in the build options with nitro.rollupConfig.output.sourcemap: hidden.                                                                    00:51:18
[00:51:18] [Sentry] Disabled source map setting in the Nuxt config: nitro.rollupConfig.output.sourcemapExcludeSources. Source maps will include the actual code to be able to un-minify code snippets in Sentry.

 ERROR  [sentry-rollup-plugin] Info: Using environment variables configured in ".env.sentry-build-plugin".                                                                       00:51:18  


 ERROR  [sentry-rollup-plugin] Warning: No release name provided. Will not inject release. Please set the release.name option to identify your release.                          00:51:18  


 ERROR  [sentry-rollup-plugin] Warning: No release name provided. Will not create release. Please set the release.name option to identify your release.                          00:51:18  

 Building for Nitro preset: static                                                                                                                                        nuxi 00:51:19
[sentry-vite-plugin] Info: Using environment variables configured in ".env.sentry-build-plugin".                                                                                 00:51:20
[sentry-vite-plugin] Warning: No release name provided. Will not inject release. Please set the release.name option to identify your release.                                    00:51:20
[sentry-vite-plugin] Warning: No release name provided. Will not create release. Please set the release.name option to identify your release.                                    00:51:20
 Building client...                                                                                                                                                            00:51:20   
 vite v6.0.11 building for production...                                                                                                                                       00:51:20
[sentry-vite-plugin] Info: Sending telemetry data on issues and performance to Sentry. To disable telemetry, set `options.telemetry` to `false`.
  358 modules transformed.                                                                                                                                                    00:51:23
computing gzip size (7)...[sentry-vite-plugin] Warning: Didn't find any matching sources for debug ID upload. Please check the `sourcemaps.assets` option.
 .nuxt/dist/client/manifest.json                   1.33 kB  gzip:  0.34 kB                                                                                                    00:51:24   
 .nuxt/dist/client/_nuxt/error-500.dGVH929u.css    1.88 kB  gzip:  0.72 kB                                                                                                    00:51:24   
 .nuxt/dist/client/_nuxt/error-404.C3V-3Mc4.css    3.56 kB  gzip:  1.10 kB                                                                                                    00:51:24   
 .nuxt/dist/client/_nuxt/entry.ofCu9KLV.css       12.41 kB  gzip:  2.57 kB                                                                                                    00:51:24   
 .nuxt/dist/client/_nuxt/BdR5AMfq.js               3.71 kB  gzip:  1.68 kB  map:     5.27 kB                                                                                 00:51:24   
 .nuxt/dist/client/_nuxt/Dhk-kskU.js               9.76 kB  gzip:  3.93 kB  map:    31.19 kB                                                                                 00:51:24   
 .nuxt/dist/client/_nuxt/Lbg0X16a.js             160.24 kB  gzip: 52.10 kB  map:   699.75 kB                                                                                 00:51:24   
 .nuxt/dist/client/_nuxt/IbnC22Td.js             306.59 kB  gzip: 92.81 kB  map: 1,566.64 kB                                                                                 00:51:24   
  built in 3.54s                                                                                                                                                              00:51:24
 Client built in 3560ms                                                                                                                                                        00:51:24   
[sentry-vite-plugin] Info: Using environment variables configured in ".env.sentry-build-plugin".                                                                                 00:51:24  
[sentry-vite-plugin] Warning: No release name provided. Will not inject release. Please set the release.name option to identify your release.                                    00:51:24
[sentry-vite-plugin] Warning: No release name provided. Will not create release. Please set the release.name option to identify your release.                                    00:51:24
 Building server...                                                                                                                                                            00:51:24   
 vite v6.0.11 building SSR bundle for production...                                                                                                                            00:51:24   
[sentry-vite-plugin] Info: Sending telemetry data on issues and performance to Sentry. To disable telemetry, set `options.telemetry` to `false`.
  54 modules transformed.                                                                                                                                                     00:51:24
 .nuxt/dist/server/_nuxt/entry-styles.D-XpIqgu.mjs             0.08 kB                                                                                                         00:51:25
 .nuxt/dist/server/_nuxt/error-404-styles.BGub-NoM.mjs         0.08 kB                                                                                                         00:51:25   
 .nuxt/dist/server/_nuxt/error-500-styles.BmnNQC4v.mjs         0.08 kB                                                                                                         00:51:25   
 .nuxt/dist/server/_nuxt/welcome-styles.Cqg1wF7g.mjs           0.15 kB                                                                                                         00:51:25   
 .nuxt/dist/server/_nuxt/error-404-styles.NlSTGTiZ.mjs         0.15 kB                                                                                                         00:51:25   
 .nuxt/dist/server/_nuxt/error-500-styles._pC1xW-P.mjs         0.15 kB                                                                                                         00:51:25   
 .nuxt/dist/server/styles.mjs                                  1.11 kB                                                                                                         00:51:25   
 .nuxt/dist/server/_nuxt/error-500-styles-1.mjs-CJrjQwQj.js    2.51 kB  map:   0.12 kB                                                                                        00:51:25   
 .nuxt/dist/server/sentry.server.config.mjs                    4.11 kB  map:   7.85 kB                                                                                        00:51:25   
 .nuxt/dist/server/_nuxt/error-404-styles-1.mjs-5Q3bo-Ck.js    4.18 kB  map:   0.12 kB                                                                                        00:51:25   
 .nuxt/dist/server/_nuxt/error-500-D1U_AuVD.js                 5.06 kB  map:   5.37 kB                                                                                        00:51:25   
 .nuxt/dist/server/_nuxt/entry-styles-1.mjs-CvMDM5yB.js       13.07 kB  map:   0.12 kB                                                                                        00:51:25   
 .nuxt/dist/server/_nuxt/error-404-C-tWvrm_.js                14.65 kB  map:  26.50 kB                                                                                        00:51:25
 .nuxt/dist/server/server.mjs                                125.18 kB  map: 182.60 kB                                                                                        00:51:25   
[sentry-vite-plugin] Warning: Didn't find any matching sources for debug ID upload. Please check the `sourcemaps.assets` option.
  built in 785ms                                                                                                                                                              00:51:25
 Server built in 793ms                                                                                                                                                         00:51:25   
 Initializing prerenderer                                                                                                                                                nitro 00:51:25

 ERROR  [sentry-rollup-plugin] Info: Sending telemetry data on issues and performance to Sentry. To disable telemetry, set options.telemetry to false.                           00:51:25  


[00:51:26]  WARN  "file:///C:/Users/barwn/git/test/projectname/node_modules/nuxt/dist/core/runtime/nitro/cache-driver.js" is imported by "virtual:#nitro-internal-virtual/storage", but could not be resolved  treating it as an external dependency.


 ERROR  [sentry-rollup-plugin] Warning: Didn't find any matching sources for debug ID upload. Please check the sourcemaps.assets option.                                         00:51:26  

 Prerendering 3 initial routes with crawler                                                                                                                              nitro 00:51:26
  ├─ /404.html (50ms)                                                                                                                                                      nitro 00:51:26
  ├─ /200.html (49ms)                                                                                                                                                      nitro 00:51:26
  ├─ / (54ms)                                                                                                                                                              nitro 00:51:26  
  ├─ /_payload.json?114c8c55-6c3c-42cb-9f67-68710bbea16e (1ms) (skipped)                                                                                                   nitro 00:51:26  
  ├─ /_payload.json (2ms)                                                                                                                                                  nitro 00:51:26
 Prerendered 4 routes in 1.732 seconds                                                                                                                                   nitro 00:51:26   
 Generated public .output/public                                                                                                                                         nitro 00:51:26
 You can preview this build using npx serve .output/public                                                                                                               nitro 00:51:26
 You can now deploy .output/public to any static hosting!  

Metadata

Metadata

Assignees

Type

Projects

Status

Waiting for: Community

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions