Skip to content

fix: resolve the vitest path alias to a native filesystem path - #69

Merged
arnabnandy7 merged 1 commit into
arnabnandy7:mainfrom
AyanAta42:fix/windowsVitestPathAlias
Aug 31, 2026
Merged

fix: resolve the vitest path alias to a native filesystem path#69
arnabnandy7 merged 1 commit into
arnabnandy7:mainfrom
AyanAta42:fix/windowsVitestPathAlias

Conversation

@AyanAta42

Copy link
Copy Markdown
Contributor

I set the project up on Windows, installed Node 24 according to the README's requirement, ran npm ci, then npm test — and every test file failed to resolve its @/... imports. New URL(...).pathname returns "/C:/Users/.../src" on Windows, which is not a valid filesystem path, so every test file failed to resolve its "@/..." imports and the suite could not run. fileURLToPath returns a correct native path on all platforms and leaves POSIX behavior unchanged.

new URL(...).pathname returns "/C:/Users/.../src" on Windows, which is not a
valid filesystem path, so every test file failed to resolve its "@/..." imports
and the suite could not run. fileURLToPath returns a correct native path on all
platforms and leaves POSIX behavior unchanged.

Signed-off-by: AyanAta42 <[email protected]>
@arnabnandy7

Copy link
Copy Markdown
Owner

LGTM, thanks for your contribution.

@arnabnandy7
arnabnandy7 merged commit cb1143c into arnabnandy7:main Aug 31, 2026
1 of 2 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Completed in Open issue portal development Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Development

Successfully merging this pull request may close these issues.

2 participants