import script setup component Module has no default export.
634323580 opened this issue · comments
xiaoZ commented
seaton commented
+1
Gavin commented
+1
ZHAO Jin-Xiang commented
Can you provide a minimal reproduction?
Gavin commented
nuxt 2 + typescript without using nuxt bridge
buildModules
param in nuxt.config.ts is like
buildModules: [
"@nuxtjs/stylelint-module",
"@nuxtjs/tailwindcss",
"@nuxt/postcss8",
"@nuxtjs/composition-api/module",
"@nuxt/typescript-build",
["@nuxtjs/dotenv", { path: "./" }],
],
And when i import the child component (written in vue setup
syntax) in the parent component,
the nuxt builtin fork-ts-checker-webpack-plugin
typescript check would throw out an error as below
ERROR in src/pages/chatroom/:id.vue:23:8
TS1192: Module '"/Users/gewb/workspace/my-stream-fe/src/components/chatroom/PrimarySidebar.vue"' has no default export.
21 |
22 | import MainContent from "~/components/chatroom/MainContent.vue";
> 23 | import PrimarySidebar from "~/components/chatroom/PrimarySidebar.vue";