Skip to main content

Bug: deployment transfers flatten symlinks into empty files (breaks Next.js/Turbopack builds)

Both rsync and turbo transfers deliver symlinks as empty (0-byte) regular files.
Next.js 16/Turbopack builds place symlinks in .next/node_modules/ (hashed aliases like
"mongoose-8b99e611e7552af3" -> ../../node_modules/mongoose) for externalized server packages.

After deployment these are 0-byte files, so require() resolves empty modules and the app
crashes at runtime ("TypeError: X.Schema is not a constructor"). Verified: local build has
symlinks, deployed release has zero symlinks anywhere under .next (find -type l returns nothing).

Log in to comment and vote

No comments yet

Be the first to share your thoughts.