solid-playground icon indicating copy to clipboard operation
solid-playground copied to clipboard

Build error - ESM file cannot be loaded by `require`

Open chiefcll opened this issue 1 year ago • 0 comments

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

chiefcll avatar Apr 24 '24 10:04 chiefcll