Skip to content
This repository has been archived by the owner on Dec 25, 2024. It is now read-only.

import script setup component Module has no default export. #131

Closed
634323580 opened this issue Apr 2, 2022 · 5 comments
Closed

import script setup component Module has no default export. #131

634323580 opened this issue Apr 2, 2022 · 5 comments

Comments

@634323580
Copy link

image

image

@634323580 634323580 reopened this Apr 2, 2022
@634323580 634323580 reopened this Apr 2, 2022
@seatonxx
Copy link

+1

1 similar comment
@BobbyJonas
Copy link

+1

@xiaoxiangmoe
Copy link
Collaborator

Can you provide a minimal reproduction?

@BobbyJonas
Copy link

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";

@BobbyJonas
Copy link

BobbyJonas commented Jun 26, 2022

related issue: #676 #668 of fork-ts-checker-webpack-plugin

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants