Only file and data URLs are supported by the default ESM loader
See original GitHub issueI’m trying to use the directory import plugin as listed in the wiki, and it does work in develop mode (wmr build
).
But when running wmr build --prerender
it’s throwing an resolve error:
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader
at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:724:11)
at Loader.resolve (internal/modules/esm/loader.js:97:40)
at Loader.getModuleJob (internal/modules/esm/loader.js:242:28)
at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:50:40)
at link (internal/modules/esm/module_job.js:49:36)
Is this a known limitation? Or is there perhaps something that I can do to fix this?
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file ...
ERROR Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths ...
Read more >Only file and data URLs are supported by the default ESM ...
... Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received...
Read more >Bud build throws "Only file and data URLs are supported by ...
22.19 $ bud build Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be valid...
Read more >ECMAScript modules | Node.js v19.3.0 Documentation
A specifier like 'https://example.com/app.js' is not supported natively in Node.js unless using a custom HTTPS loader. file: URLs#. Modules are loaded multiple ...
Read more >Lab 7.1 ERR_UNSUPPORTED_ESM_URL_SCHEME
... Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This was resolved with #600. Updating to a recent version of
@wmrjs/directory-import
fixes it 👍No edits. Stright from the repo: