Skip to content

Fix Windows path compatibility for npx check-ai#5

Merged
f merged 1 commit into
f:mainfrom
tscburak:main
Mar 9, 2026
Merged

Fix Windows path compatibility for npx check-ai#5
f merged 1 commit into
f:mainfrom
tscburak:main

Conversation

@tscburak
Copy link
Copy Markdown
Contributor

@tscburak tscburak commented Mar 7, 2026

npx check-ai was throwing the following error on Windows due to how absolute paths were being handled by the Node.js ESM loader:

Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'

This happens because Windows absolute paths (e.g. C:\...) are not valid ESM URLs. The Node.js ESM loader expects paths to be provided as file:// URLs.

To fix this, the Node.js native pathToFileURL utility is used to convert filesystem paths into OS-safe file:// URLs before loading them.

@tscburak
Copy link
Copy Markdown
Contributor Author

tscburak commented Mar 9, 2026

@f Windows users are waiting for the ‘merged’ news 😅

@f f merged commit 106fbe5 into f:main Mar 9, 2026
@f
Copy link
Copy Markdown
Owner

f commented Mar 9, 2026

Deployment fails. Can you fix the CI issue and resend a PR?

@tscburak
Copy link
Copy Markdown
Contributor Author

tscburak commented Mar 9, 2026

@f I checked the CI errors. I ran Prettier and ESLint and made sure there are no warnings. See #6

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