Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
8.49.0
Framework Version
Next 15.1.5
Link to Sentry event
No response
Reproduction Example/SDK Setup
// Sentry initSentry.init({dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT,tracesSampleRate: process.env.NEXT_PUBLIC_SENTRY_TRACES_SAMPLE_RATE_FLOAT
? parseFloat(process.env.NEXT_PUBLIC_SENTRY_TRACES_SAMPLE_RATE_FLOAT)
: 0.01,});// Next config using withSentryConfigmodule.exports=withSentryConfig(nextConfig,{org: 'orgName',project: 'products',// Only print logs for uploading source maps in CIsilent: !process.env.CI,// Upload a larger set of source maps for prettier stack traces (increases build time)widenClientFileUpload: true,// Hides source maps from generated client bundleshideSourceMaps: true,// Automatically tree-shake Sentry logger statements to reduce bundle sizedisableLogger: true,// also fails without this whole section being present, and it also used to work without it being there at allsourcemaps: {// Ensure sourcemaps are left behind by Sentry so that next-sitemap can use themdeleteSourcemapsAfterUpload: false,},});Steps to Reproduce
Set up a Next project with Sentry integration.
Add next-sitemap as a dependency, e.g. pnpm add next-sitemap / npm install next-sitemap.
Add a next-sitemap.config.js file:
module.exports={siteUrl: 'https://www.example.com',generateIndexSitemap: false,sitemapSize: 1000000,};Add a postbuild step in package.json:
"postbuild": "next-sitemap",
Set a valid SENTRY_DSN env variable value and run pnpm build / npm build.
Expected Result
Postbuild step succeeds in generating the sitemap -- this is working on v8.48.0
Actual Result
Error in postbuild step:
...
11:20:08 AM: products:build: [@sentry/nextjs - Node.js] Info: Successfully uploaded source maps to Sentry
11:20:08 AM: products:build: 11:20:08 AM: products:build: > products@0.1.0 postbuild /opt/build/repo/apps/products
11:20:08 AM: products:build: > next-sitemap
11:20:08 AM: products:build: 11:20:08 AM: products:build: ✨ [next-sitemap] Loading next-sitemap config: file:///opt/build/repo/apps/products/next-sitemap.config.js
11:20:08 AM: products:build: ❌ [next-sitemap] Unable to find build-manifest.
11:20:08 AM: products:build: Make sure to build the project using `next build` command
11:20:08 AM: products:build: 11:20:08 AM: products:build: ❌ [next-sitemap] undefined
...
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
8.49.0
Framework Version
Next 15.1.5
Link to Sentry event
No response
Reproduction Example/SDK Setup
Steps to Reproduce
Set up a Next project with Sentry integration.
Add
next-sitemapas a dependency, e.g.pnpm add next-sitemap/npm install next-sitemap.Add a
next-sitemap.config.jsfile:Add a postbuild step in package.json:
Set a valid
SENTRY_DSNenv variable value and runpnpm build/npm build.Expected Result
Postbuild step succeeds in generating the sitemap -- this is working on v8.48.0
Actual Result
Error in postbuild step: