Bug: Error when running npx tsx ./scripts/githooks/check-localstorage-usage.ts
on Windows
#3423
Labels
npx tsx ./scripts/githooks/check-localstorage-usage.ts
on Windows
#3423
Describe the bug
Running the command
npx tsx ./scripts/githooks/check-localstorage-usage.ts
on Windows produces an error:Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader.
This prevents the script from functioning as expected on Windows systems.
To Reproduce
Steps to reproduce the behavior:
Use Node.js version 18.17.1 on a Windows environment.
Run
npx tsx ./scripts/githooks/check-localstorage-usage.ts.
Observe the error output in the terminal.
Expected behavior
The script should execute successfully on Windows, just as it does on other operating systems, without throwing any errors.
Actual behavior
The script fails with the following error:
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.
Screenshots
Additional details
Potential internship candidates
Please read this if you are planning to apply for a Palisadoes Foundation internship
The text was updated successfully, but these errors were encountered: