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

Loading with --experimental-modules #80

Closed
ianengelbrecht opened this issue Oct 28, 2021 · 2 comments
Closed

Loading with --experimental-modules #80

ianengelbrecht opened this issue Oct 28, 2021 · 2 comments

Comments

@ianengelbrecht
Copy link

ianengelbrecht commented Oct 28, 2021

If I include import clipboard from 'clipboardy' in a script and then run that script with node --experimental-modules script.js, I get Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. This is with Node 12. package.json includes "type": "module"

@sindresorhus
Copy link
Owner

This is not an issue with this package.

--experimental-modules is no longer needed. ESM is unflagged. Also ensure you're on the latest Node.js 12.x.x version.

https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

@ianengelbrecht
Copy link
Author

ianengelbrecht commented Oct 28, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants