Skip to content

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

@chiefcll

Description

@chiefcll

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions