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

Error: require() cannot be used on an ESM graph with top-level await. #247

Open
timint opened this issue Nov 14, 2024 · 2 comments
Open

Comments

@timint
Copy link

timint commented Nov 14, 2024

I think there is a dependancy problem when importing this module. To see where the top-level await comes from, use --experimental-print-required-tla.

import svgtofont from 'svgtofont';

Error: require() cannot be used on an ESM graph with top-level await. Use import() instead.

svgtofont 6.0.1
Node 23.1.0

@chronolai
Copy link

It's work for me

CleanShot 2024-12-16 at 15 55 45

@timint
Copy link
Author

timint commented Dec 17, 2024

Is this something you provided for a fix? That doesn't look to be ESM use. Is your file gulpfile.mjs?

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