Skip to content

fix: ignore EEXIST errors when symlinking traced files in adapter-vercel - #16809

Open
elliott-with-the-longest-name-on-github wants to merge 1 commit into
version-3from
vercel-symlink-eexist
Open

fix: ignore EEXIST errors when symlinking traced files in adapter-vercel#16809
elliott-with-the-longest-name-on-github wants to merge 1 commit into
version-3from
vercel-symlink-eexist

Conversation

@elliott-with-the-longest-name-on-github

Copy link
Copy Markdown
Contributor

closes #16806

In a pnpm workspace, @vercel/nft can trace the same dependency through two different symlink chains (e.g. apps/app/node_modules/X and packages/ui/node_modules/X) that both realpath to the same file in the pnpm store. create_function_bundle assumed traced file → destination is 1:1, so the second occurrence hit fs.symlinkSync on a dest that already existed and crashed the build with EEXIST.

Wraps the symlink in a try/catch that ignores EEXIST — both chains would produce an equivalent link, so skipping the duplicate is safe.

@pkg-svelte-dev

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from e1fc355:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/e1fc35517f43ebdc6576c5fa59b6361b1b025d59

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/16809

@changeset-bot

changeset-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e1fc355

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/adapter-vercel Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@svelte-docs-bot

Copy link
Copy Markdown

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[adapter-vercel] EEXIST in create_function_bundle when a workspace lib and the app resolve the same dependency through different pnpm symlink chains

1 participant