Skip to content

Next.js webpack builds bake absolute paths into server chunks, breaking relocated deploys #23266

Description

@chargome

next build with webpack emits absolute build-machine paths into .next/server/**:

require("/vercel/path0/node_modules/.../@sentry/server-utils/build/cjs/orchestrion/index.js")

Any deploy that relocates the output — Vercel (/vercel/path0/var/task), Docker multi-stage, output: 'standalone' — turns these into MODULE_NOT_FOUND on the first request to a dynamic route. Static routes still work, so the build looks healthy.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions