Monorepo subdirectory builds fixed; WebSocket close bridged
vercel@54.18.7
Patch Changes
-
4d9394b: Bridge WebSocket close to response close
-
c4667d3: Fix
vc buildrun from a monorepo subdirectory (gated behindVERCEL_RESOLVE_ROOT_DIRECTORY=1).When a project is linked in place (
apps/api/.vercel/project.json) andvc buildis run from that directory, the build previously treated the linked subdirectory as the repository root. Because the project's dependencies are typically hoisted to the monorepo root above it, this broke builds in several ways that share one root cause:- A
rootDirectorysetting that restates the link's own location (e.g.apps/apifor a link atapps/api) double-appended intoapps/api/apps/api, failing withENOENT … /apps/api/apps/api/.next/package.json. - With
--standalone, the package-manager symlink that makes a dependency resolvable (apps/api/node_modules/hono→../../node_modules/.pnpm/.../hono) was skipped because its target pointed outside the subdirectory, so the deployed function failed at runtime withCannot find module 'hono'even though the dependency's files were packaged. - Builders traced from the wrong root, so Next.js set an incorrect
outputFileTracingRoot/turbopack.root(Turbopack errors; Webpack.nft.jsonomits hoisted dependencies).
With the flag enabled, a per-directory link is resolved like a repository-level link: the repository root is detected (workspace markers, then git) and the project is expressed as its path relative to that root, so the build is anchored correctly regardless of which directory the command is run from. The
rootDirectorysetting is interpreted relative to the link's location and honored when it points at a folder that exists; otherwise (e.g. the redundantapps/api/apps/apicase) it is ignored in favor of the link's own location and a warning is emitted. Standalone builds additionally preserve the package-manager symlinks (rather than skipping them) so dependencies resolve at runtime. Behavior is unchanged when the flag is not set. - A
-
Updated dependencies [69892ba]
- @vercel/rust@1.4.0
- @vercel/node@5.8.22
Fetched July 1, 2026
