storybook-vue / storybook-nuxt-demo

Demo for Storybook-nuxt integration
16 stars 5 forks source link

How to work with nuxt-icon? #10

Closed zhangyu1818 closed 11 months ago

zhangyu1818 commented 11 months ago

Hello, I recently cloned your repository and it worked perfectly. However, when I tried to integrate nuxt-icon, I encountered an error.

 ERROR  Internal server error: At least one <template> or <script> is required in a single file component.                                                                                                                                                                                                            00:01:14
  Plugin: vite:vue
  File: /Users/zhangyu/Desktop/storybook-nuxt-demo/node_modules/.pnpm/nuxt-icon@0.5.0_vue@3.3.4/node_modules/nuxt-icon/dist/runtime/IconCSS.vue
      at Object.parse$2 [as parse] (/Users/zhangyu/Desktop/storybook-nuxt-demo/node_modules/.pnpm/@vue+compiler-sfc@3.3.4/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:1275:7)
      at createDescriptor (file:///Users/zhangyu/Desktop/storybook-nuxt-demo/node_modules/.pnpm/@vitejs+plugin-vue@4.2.3_vite@4.4.7_vue@3.3.4/node_modules/@vitejs/plugin-vue/dist/index.mjs:70:43)
      at transformMain (file:///Users/zhangyu/Desktop/storybook-nuxt-demo/node_modules/.pnpm/@vitejs+plugin-vue@4.2.3_vite@4.4.7_vue@3.3.4/node_modules/@vitejs/plugin-vue/dist/index.mjs:2273:34)
      at TransformContext.transform (file:///Users/zhangyu/Desktop/storybook-nuxt-demo/node_modules/.pnpm/@vitejs+plugin-vue@4.2.3_vite@4.4.7_vue@3.3.4/node_modules/@vitejs/plugin-vue/dist/index.mjs:2794:16)
      at Object.transform (file:///Users/zhangyu/Desktop/storybook-nuxt-demo/node_modules/.pnpm/vite@4.4.7_@types+node@18.16.19/node_modules/vite/dist/node/chunks/dep-3b8eb186.js:44240:62)
      at async loadAndTransform (file:///Users/zhangyu/Desktop/storybook-nuxt-demo/node_modules/.pnpm/vite@4.4.7_@types+node@18.16.19/node_modules/vite/dist/node/chunks/dep-3b8eb186.js:54896:29)

I've looked for solutions online but haven't found anything that resolves this issue. Would you be able to help or guide me on how to fix this? Thank you!