solidjs / solidjs/solid-playground
Build error - ESM file cannot be loaded by `require`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 244
- Forks
- 69
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the error with pnpm i and pnpm run dev, then inspect the playground package.json mentioned in the issue. The change is complete when the development command no longer reports that unocss/vite is an ESM file loaded by require.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vite
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100