Description
On Vercel, Next.js 16 + Turbopack builds with supportsImmutableAssets enabled emit client chunks only to .next/static/immutable/chunks — plain static/chunks is never created.
getBuildPluginOptions.ts's createSourcemapUploadAssetPatterns still unconditionally adds the static/chunks path to the upload/delete asset list for after-production-compile-turbopack; only the immutable path is guarded with fs.existsSync. That causes uploadSourcemaps/deleteArtifacts to throw:
[@sentry/nextjs - After Production Compile] Error: An error occurred. Couldn't finish all operations: Error [SentryError]: Directory '/vercel/path0/.next/static/chunks' does not exist.
Build still completes successfully — error is logged, not fatal — but it's noisy.
Description
On Vercel, Next.js 16 + Turbopack builds with supportsImmutableAssets enabled emit client chunks only to .next/static/immutable/chunks — plain static/chunks is never created.
getBuildPluginOptions.ts's createSourcemapUploadAssetPatterns still unconditionally adds the static/chunks path to the upload/delete asset list for after-production-compile-turbopack; only the immutable path is guarded with fs.existsSync. That causes uploadSourcemaps/deleteArtifacts to throw:
Build still completes successfully — error is logged, not fatal — but it's noisy.