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

Fix windows ESM issue #48

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Fix windows ESM issue #48

wants to merge 1 commit into from

Conversation

epszaw
Copy link
Member

@epszaw epszaw commented Dec 24, 2024

fixes #47

@epszaw epszaw added the type:bug Something isn't working label Dec 24, 2024
@epszaw epszaw requested a review from delatrie December 24, 2024 14:30
* The function appends `file:///` protocol to the absolute paths on Windows due to ES modules imports specifics
* @param path
*/
export const normalizeImportPath = (path: string) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to normalize paths with url.pathToFileURL as Node.js docs suggests. We should use it even on mac/linux because node requires module specifiers to be percent-encoded, which pathToFileURL does.

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

Successfully merging this pull request may close these issues.

Error code: ‘ERR_UNSUPPORTED_ESM_URL_SCHEME’ when trying to generate a report
2 participants