-
-
Notifications
You must be signed in to change notification settings - Fork 927
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
Fix ERR_UNSUPPORTED_ESM_URL_SCHEME
error on Windows
#7383
Conversation
🦋 Changeset detectedLatest commit: 2bd6507 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
7adba1b
to
383f6df
Compare
ERR_UNSUPPORTED_ESM_URL_SCHEME
error on Windows
@JounQin Thank you for looking into this! Is it possible to add tests to cover this scenario? And do we also need to use this approach for plugins and custom formatters? (FYI, I removed the bug label to be consistent with our guidelines). |
I'm not quite familiar with how to test such edge cases.
If they may be loaded with absolute path, then yes, otherwise there is no need do it.
Can we remove such unused labels in repository preset? |
916624e
to
e547bf4
Compare
@ybiquitous I think the latest change e547bf4 requested makes more problems than it wants to resolve. I think we should just revert this commit, only |
e547bf4
to
408d210
Compare
408d210
to
3e37bb3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JounQin Can we fix getModulePath()
instead as #7382 (comment)?
Just curious, what problem? |
Ah, you didn't need to force-push since we couldn't find the failed CI easily. |
I found the failure cause of e547bf4. The However, I think we must fix dynamic stylelint/lib/augmentConfig.mjs Line 320 in 2a82f4d
So, how about adding a tiny utility to wrap dynamic // lib/utils/dynamicImport.mjs
export default dynamicImport(path) {
const fixedPath = isAbsolute(path) ? pathToFileURL(path).toString() : path;
return import(fixedPath);
} |
Sure, a tiny util is fine enough. I didn't find that usage previously. Wait minutes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! LGTM 👍🏼
The same error is thrown in cli.mjs when running |
@CrOrc You need to create a new issue with online and runnable reproduction. |
close #7382
No, it's self-explanatory.