#17655·vercel

`vercel build` fails on Windows without Developer Mode: EPERM creating deduplicated `.func` symlink (#11118 still reproduces)

Author: lumatic2Created Sep 28, 2026Updated Sep 28, 2026

vercel build --prod fails on Windows while writing .vercel/output, after next build itself has succeeded:

Error: EPERM: operation not permitted, symlink 'foods\[slug].func' -> 'C:\Users\<user>\<project>\.vercel\output\functions\_global-error.rsc.func'

(from .vercel/output/builds.json: code: "EPERM", syscall: "symlink", errno: -4048)

This is the same error as #11118. That issue was closed in 2024 with a pointer to the community forum rather than a fix, and it still happens on current versions. It had no details, so here they are.

Environment

  • Vercel CLI 59.15.1 (global npm install), bundled @vercel/next 11.0.4
  • Next.js 16.3.4 (App Router), React 19.3.0
  • Node.js 24.14.1
  • Windows 11 (10.0.26200), normal user shell, Developer Mode off
  • The same commit builds and deploys fine with vercel build --prod + vercel deploy --prebuilt --prod on a Linux GitHub Actions runner.

What seems to happen

When two routes resolve to the same function, the build output writer creates a symlink to the already-written .func directory instead of copying it (writeFunctionSymlink, fs.symlink(target, dest) with no type):

https://github.com/vercel/vercel/blob/c628be7835e03a965b93e9cf9e2bd5ac2acbf5eb/internals/builder-orchestration/src/write-build-result.ts#L702-L719

Here, Next 16's _global-error.rsc function is deduplicated against foods/[slug]. On Windows, a directory symlink needs SeCreateSymbolicLinkPrivilege (admin or Developer Mode), so a regular user gets EPERM. The app is small (home page, two dynamic pages /foods/[slug] and /recipes/[slug], two route handlers), so I suspect many App Router apps on Next 16 hit this. I haven't confirmed that with a fresh create-next-app.

Node primitive, same machine, without Developer Mode:

javascript
// functions/a.func exists; create functions/foods/[slug].func -> ../a.func
await fs.symlink('..\\a.func', dest);             // EPERM: operation not permitted, symlink
await fs.symlink(absTarget, dest + '2', 'junction'); // ok

Why I'm filing an issue instead of a PR

The obvious fix (pass 'junction' on win32) is not free. Junctions always store an absolute target, and #17631 describes how absolute and backslash link targets from a Windows .vercel/output break at runtime after deploy --prebuilt. Other options would be to fall back to copying the directory when symlink throws EPERM on win32, or to fail with a message that names Developer Mode. Which of these do you want?

Expected

vercel build on Windows either produces a usable .vercel/output without elevated privileges, or fails with an error that explains what to change. Today it gives a bare EPERM after the whole Next build has finished.