You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
node_modules/vite/dist/node/chunks/dep-76613303.js:29941:7: error: [plugin: vite:dep-scan] Missing "./dist/style.css"exportin"vue3-markdown" package
29941 │ throw new Error(
╵ ^
at bail (/home/projects/vite-yrtqob/node_modules/vite/dist/node/chunks/dep-76613303.js:29941:8)
at resolve (/home/projects/vite-yrtqob/node_modules/vite/dist/node/chunks/dep-76613303.js:30018:10)
at resolveExports (/home/projects/vite-yrtqob/node_modules/vite/dist/node/chunks/dep-76613303.js:30641:12)
at resolveDeepImport (/home/projects/vite-yrtqob/node_modules/vite/dist/node/chunks/dep-76613303.js:30657:26)
at tryNodeResolve (/home/projects/vite-yrtqob/node_modules/vite/dist/node/chunks/dep-76613303.js:30440:20)
at Context.resolveId (/home/projects/vite-yrtqob/node_modules/vite/dist/node/chunks/dep-76613303.js:30257:28)
at Object.resolveId (/home/projects/vite-yrtqob/node_modules/vite/dist/node/chunks/dep-76613303.js:36922:55)
at async resolve (/home/projects/vite-yrtqob/node_modules/vite/dist/node/chunks/dep-76613303.js:37125:26)
at async eval (/home/projects/vite-yrtqob/node_modules/vite/dist/node/chunks/dep-76613303.js:37263:34)
at async callback (/home/projects/vite-yrtqob/node_modules/esbuild/lib/main.js:832:28)
node_modules/vite/dist/node/chunks/dep-76613303.js:37253:18: note: This error came from the "onResolve" callback registered here
37253 │ build.onResolve({
╵ ~~~~~~~~~
at setup (/home/projects/vite-yrtqob/node_modules/vite/dist/node/chunks/dep-76613303.js:37253:19)
at handlePlugins (/home/projects/vite-yrtqob/node_modules/esbuild/lib/main.js:756:23)
at Object.buildOrServe (/home/projects/vite-yrtqob/node_modules/esbuild/lib/main.js:1044:7)
at eval (/home/projects/vite-yrtqob/node_modules/esbuild/lib/main.js:1895:17)
at new Promise (<anonymous>)
at Object.build (/home/projects/vite-yrtqob/node_modules/esbuild/lib/main.js:1894:14)
at Object.build (/home/projects/vite-yrtqob/node_modules/esbuild/lib/main.js:1749:51)
at eval (/home/projects/vite-yrtqob/node_modules/vite/dist/node/chunks/dep-76613303.js:37083:54)
at Array.map (<anonymous>)
local-script:/home/projects/vite-yrtqob/App.vue:4:7: note: The plugin "vite:dep-scan" was triggered by this import
4 │ import 'vue3-markdown/dist/style.css';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error when starting dev server:
Error: Build failed with 1 error:
node_modules/vite/dist/node/chunks/dep-76613303.js:29941:7: error: [plugin: vite:dep-scan] Missing "./dist/style.css"exportin"vue3-markdown" package
at failureErrorWithLog (/home/projects/vite-yrtqob/node_modules/esbuild/lib/main.js:1493:15)
at eval (/home/projects/vite-yrtqob/node_modules/esbuild/lib/main.js:1151:28)
at runOnEndCallbacks (/home/projects/vite-yrtqob/node_modules/esbuild/lib/main.js:941:63)
at buildResponseToResult (/home/projects/vite-yrtqob/node_modules/esbuild/lib/main.js:1149:7)
at eval (/home/projects/vite-yrtqob/node_modules/esbuild/lib/main.js:1258:14)
at eval (/home/projects/vite-yrtqob/node_modules/esbuild/lib/main.js:629:9)
at handleIncomingPacket (/home/projects/vite-yrtqob/node_modules/esbuild/lib/main.js:726:9)
at Socket.readFromStdout (/home/projects/vite-yrtqob/node_modules/esbuild/lib/main.js:596:7)
at Socket.EventEmitter.emit (https://vite-yrtqob.w.staticblitz.com/blitz.528f704493b63b14b6f9ee36935eead8382e8395.js:6:126633)
at addChunk (https://vite-yrtqob.w.staticblitz.com/blitz.528f704493b63b14b6f9ee36935eead8382e8395.js:6:516009)
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
wow, it was caused by vite's strict adherence to the exports field in the package.json, which css file does not exported. Of course, this is the package.json in vue3-markdown, but it has fixed now. This issue can now be closed.
Describe the bug
My project uses a dependency library on npm, and I get this error when I import the css from the dependency library.
!!! However, the same code works fine with vue-cli. vue-cli demo
Reproduction
https://stackblitz.com/edit/vite-yrtqob?file=vite.config.js
System Info
Used Package Manager
yarn
Logs
Validations
The text was updated successfully, but these errors were encountered: