Skip to content

fix(cli): skip Next.js, Nuxt, and SvelteKit build directories during dev snapshot copying#102

Open
crossxr wants to merge 2 commits into
vercel:mainfrom
crossxr:main
Open

fix(cli): skip Next.js, Nuxt, and SvelteKit build directories during dev snapshot copying#102
crossxr wants to merge 2 commits into
vercel:mainfrom
crossxr:main

Conversation

@crossxr

@crossxr crossxr commented Jun 19, 2026

Copy link
Copy Markdown

Description

During local development running eve dev or npm run dev, the CLI recursively copies the source workspace to an immutable snapshot directory under .eve/dev-runtime/snapshots//source/.

When working in framework environments like Next.js, Nuxt, or SvelteKit, the CLI attempts to scan and recursively copy the transient build/cache directories (e.g. .next/, .nuxt/, .svelte-kit/). Because these frameworks dynamically create, modify, and delete files during startup and builds, a race condition often occurs: a file (like .next/lock) is deleted by the framework after the Eve CLI reads the directory contents but before it runs lstat or cp on that path. This causes the CLI copying logic to throw an ENOENT error, crashing the dev server startup.

Solution: Added .next, .nuxt, and .svelte-kit framework build/cache directories to the SNAPSHOT_SKIP_NAMES set in packages/eve/src/internal/nitro/dev-runtime-source-snapshot-copy.ts so they are bypassed during snapshot copying.

Also updated the @vercel/eve-catalog package clean script from rm -rf dist to a cross-platform command (node -e "fs.rmSync(...)") to allow project typechecking/building to succeed on Windows.

How did you test your changes?

  1. Added an integration test to packages/eve/src/internal/nitro/dev-runtime-artifacts.integration.test.ts verifying that .next, .nuxt, and .svelte-kit directories are skipped during staging.

  2. Verified all integration tests pass:

bash
pnpm --filter eve exec vitest run --config vitest.integration.config.ts dev-runtime-artifacts
  1. Verified the codebase typechecks, lints, formats, and invariant guards pass:
bash
pnpm typecheck
pnpm lint
pnpm fmt
pnpm guard:invariants

PR Checklist

  • I ran the relevant checks from CONTRIBUTING.md
  • I added tests and documentation where relevant
  • I added a changeset if this touches the published eve package
  • DCO sign-off passes for every commit (git commit --signoff)

…dev snapshot copying

Signed-off-by: suryakant subudhi <suryakant.subudhi@outlook.com>
@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

@crossxr is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Comment thread packages/eve/src/setup/scaffold/create/web-template.ts Outdated
Signed-off-by: suryakant subudhi <suryakant.subudhi@outlook.com>
@AndrewBarba

Copy link
Copy Markdown
Collaborator

Thanks a lot we'll take a look at this Monday. We're just wrapping up some plumbing on our side so we can officially accept outside contributions, safely run CI etc.

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.

2 participants