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

Build error - ESM file cannot be loaded by require #174

Open
chiefcll opened this issue Apr 24, 2024 · 0 comments
Open

Build error - ESM file cannot be loaded by require #174

chiefcll opened this issue Apr 24, 2024 · 0 comments

Comments

@chiefcll
Copy link
Contributor

Checking out the project and pnpm i and pnpm run dev throws the following error:

✘ [ERROR] "unocss/vite" resolved to an ESM file. ESM file cannot be loaded by require. See https://vitejs.dev/guide/troubleshooting.html#this-package-is-esm-only for more details. [plugin externalize-deps]

I was able to fix by adding

"type": "module", to the playground package.json

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

1 participant