Conversation
`yarn run setup` fails on Windows with "'mv' is not recognized as an internal or external command" right after `clasp create` succeeds, leaving `.clasp.json` stuck in `dist/` instead of at the repo root where `clasp push`/`yarn deploy` expect it. Saw in the issue thread that the Vite migration was expected to remove the need for `mv` but didn't fully resolve it, and that a Windows-only `move` workaround was suggested -- that would trade the Windows breakage for breaking `mv` on macOS/Linux. This uses `fs.renameSync` instead, which works identically on every platform Node runs on. Kept it dependency-free (no new package) since it's a one-line rename and Node is already a hard prerequisite here. Fixes enuchi#156. Verified: reproduced the exact cmd.exe failure, confirmed the fix works identically under cmd.exe and POSIX shells, and confirmed `npm run build` still succeeds end to end. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Reviewed-by: si-kui-a
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.
Fixes #156.
yarn run setupfails on Windows with "'mv' is not recognized as an internal or external command" right afterclasp createsucceeds, leaving.clasp.jsonstuck indist/instead of at the repo root whereclasp push/yarn deployexpect it.I saw in the issue thread that the Vite migration was expected to remove the need for
mvbut didn't fully resolve it, and that a Windows-onlymoveworkaround was suggested — that would trade the Windows breakage for breakingmvon macOS/Linux. This usesfs.renameSyncinstead, which works identically on every platform Node runs on. Kept it dependency-free (no new package) since it's a one-line rename and Node is already a hard prerequisite here.Test plan
npm run buildstill succeeds end to end.Co-authored with Claude Code (Anthropic); reviewed by @si-kui-a before submission.