Skip to content

"Directory '.next/static/chunks' does not exist" error during After Production Compile on Turbopack #24253

Description

@chargome

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions