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: import error when using ESM and windows #2

Merged
merged 1 commit into from Mar 14, 2022

Conversation

Julien-R44
Copy link
Member

Hello !

  • Create a fresh project on Windows
  • npm init japa
  • Select JS ESM mode
  • run node bin/test.mjs with Node 16

Got this error :

Only file and data URLs are supported by the default ESM loader. On Windows, absolute 
paths must be valid file:// URLs. Received protocol 'c:

Found the solution by reading this issue: nodejs/node#31710

@OmgImAlexis
Copy link

Same issue here and this resolved it.

@thetutlage thetutlage merged commit bdd71d6 into japa:develop Mar 14, 2022
@thetutlage
Copy link
Contributor

Thanks @Julien-R44

@thetutlage thetutlage self-requested a review March 14, 2022 05:09
@thetutlage thetutlage added the Type: Bug The issue has indentified a bug label Mar 14, 2022
@Julien-R44 Julien-R44 deleted the fix/esm-windows-import branch March 14, 2022 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug The issue has indentified a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants