fix(cli): skip Next.js, Nuxt, and SvelteKit build directories during dev snapshot copying#102
Open
crossxr wants to merge 2 commits into
Open
fix(cli): skip Next.js, Nuxt, and SvelteKit build directories during dev snapshot copying#102crossxr wants to merge 2 commits into
crossxr wants to merge 2 commits into
Conversation
…dev snapshot copying Signed-off-by: suryakant subudhi <suryakant.subudhi@outlook.com>
|
@crossxr is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
Signed-off-by: suryakant subudhi <suryakant.subudhi@outlook.com>
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
During local development running
eve devornpm 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_NAMESset 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?
Added an integration test to
packages/eve/src/internal/nitro/dev-runtime-artifacts.integration.test.tsverifying that .next, .nuxt, and .svelte-kit directories are skipped during staging.Verified all integration tests pass:
PR Checklist
CONTRIBUTING.mdevepackagegit commit --signoff)