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

Not common js or esm error when building in Astro #4

Open
josh-tt opened this issue Feb 1, 2023 · 1 comment
Open

Not common js or esm error when building in Astro #4

josh-tt opened this issue Feb 1, 2023 · 1 comment

Comments

@josh-tt
Copy link

josh-tt commented Feb 1, 2023

Hi Eric, just getting around finally to test the new update and am currently using Astro. When importing the plugin I got an error about the file not being common js or esm. Adding type: module and changing the entry to .mjs fixed the error, though I'm honestly not sure if that was the right thing to do or what issues it might cause. Just thought I'd mention in case it was an oversight in your package.json

"main": "src/index.mjs",
"type": "module",

@ekwoka
Copy link
Owner

ekwoka commented Feb 1, 2023

Does look like they're missing that info.

Just the type and an exports key being added should solve them. The package.json are old :(

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