Skip to content

fix(create): normalize target directory to forward slashes on Windows#971

Open
fengmk2 wants to merge 1 commit intomainfrom
fix-938
Open

fix(create): normalize target directory to forward slashes on Windows#971
fengmk2 wants to merge 1 commit intomainfrom
fix-938

Conversation

@fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Mar 16, 2026

On Windows, path.join and path.normalize produce backslash-separated
paths (e.g., packages\core). When passed as CLI arguments to external
commands like create-vite, the backslash gets lost, creating
packagescore instead of packages/core.

Normalize all relative target directory paths to forward slashes at the
source: in formatTargetDir() and in bin.ts path joins.

Closes #938

On Windows, `path.join` and `path.normalize` produce backslash-separated
paths (e.g., `packages\core`). When passed as CLI arguments to external
commands like `create-vite`, the backslash gets lost, creating
`packagescore` instead of `packages/core`.

Normalize all relative target directory paths to forward slashes at the
source: in `formatTargetDir()` and in `bin.ts` path joins.

Closes #938
@netlify
Copy link

netlify bot commented Mar 16, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 13a84ac
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69b812b37844b600083d5a58

Copy link
Member Author

fengmk2 commented Mar 16, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@fengmk2 fengmk2 self-assigned this Mar 16, 2026
@fengmk2 fengmk2 marked this pull request as ready for review March 16, 2026 14:25
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.

[Windows] vp create vite:application fails with scoped package names and missing directories

1 participant