Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Error ERR_UNSUPPORTED_ESM_URL_SCHEME #22

Open
joris-fonck-loreal opened this issue Sep 20, 2024 · 2 comments
Open

[Bug] Error ERR_UNSUPPORTED_ESM_URL_SCHEME #22

joris-fonck-loreal opened this issue Sep 20, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@joris-fonck-loreal
Copy link

Description

First of all, thank you for your amazing work for this tool, volar and other projects!

I'm trying to use tsslint on Windows and I got the following error when using the CLI:

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

The error appear in watch.ts file line 23. The given imported file at line 21 is not using file:// protocol. But when I tried to put file protocol at the beginning of the path, I still have the same issue. So maybe it's because of the created hashed file in node_modules/.tsslint/<hash>.mjs. There are using c:// protocol to import files but I don't know how this file is generated so I didn't tested it.

@johnsoncodehk johnsoncodehk added the bug Something isn't working label Sep 21, 2024
@johnsoncodehk
Copy link
Owner

node_modules/.tsslint/<hash>.mjs will be rebuilt every time you execute tsslint command. When you added file:// and execute tsslint command again, node_modules/.tsslint/<hash>.mjs should be updated.

I'll try to test this issue on windows, and it would be helpful if you could provide a reproduction.

@joris-fonck-loreal
Copy link
Author

Of course. Here is a repro: https://github.com/joris-fonck-loreal/tsslint-vscode-ext-repro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants