vite-solid example 报错 #3805
Unanswered
bytegolang
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
https://unocss.dev/integrations/#examples
https://stackblitz.com/edit/unocss-unocss-k4tise?file=package.json,vite.config.ts
❯ node .stackblitz.mjs && npm install && npm run dev
added 199 packages in 21s
50 packages are looking for funding
run
npm fund
for details✘ [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]This error came from the "onResolve" callback registered here:
The plugin "externalize-deps" was triggered by this import
✘ [ERROR] "@unocss/preset-icons" 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]This error came from the "onResolve" callback registered here:
The plugin "externalize-deps" was triggered by this import
✘ [ERROR] "@unocss/preset-uno" 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]This error came from the "onResolve" callback registered here:
The plugin "externalize-deps" was triggered by this import
✘ [ERROR] "@unocss/preset-attributify" 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]This error came from the "onResolve" callback registered here:
The plugin "externalize-deps" was triggered by this import
failed to load config from /home/projects/unocss-unocss-k4tise/vite.config.ts
error when starting dev server:
Error: Build failed with 4 errors:
node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:68709:9: ERROR: [plugin: externalize-deps] "@unocss/preset-attributify" 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.node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:68709:9: ERROR: [plugin: externalize-deps] "@unocss/preset-icons" 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.node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:68709:9: ERROR: [plugin: externalize-deps] "@unocss/preset-uno" 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.node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:68709:9: ERROR: [plugin: externalize-deps] "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.at failureErrorWithLog (/home/projects/unocss-unocss-k4tise/node_modules/esbuild/lib/main.js:1641:15)
at eval (/home/projects/unocss-unocss-k4tise/node_modules/esbuild/lib/main.js:1049:25)
at runOnEndCallbacks (/home/projects/unocss-unocss-k4tise/node_modules/esbuild/lib/main.js:1476:45)
at buildResponseToResult (/home/projects/unocss-unocss-k4tise/node_modules/esbuild/lib/main.js:1047:7)
at eval (/home/projects/unocss-unocss-k4tise/node_modules/esbuild/lib/main.js:1076:16)
at responseCallbacks. (/home/projects/unocss-unocss-k4tise/node_modules/esbuild/lib/main.js:694:9)
at handleIncomingPacket (/home/projects/unocss-unocss-k4tise/node_modules/esbuild/lib/main.js:754:9)
at Socket.readFromStdout (/home/projects/unocss-unocss-k4tise/node_modules/esbuild/lib/main.js:670:7)
at Socket.emit (node:events:30:11464)
at addChunk (node:internal/streams/readable:222:3922)
Beta Was this translation helpful? Give feedback.
All reactions