Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
@jddao
Copy link

jddao commented Apr 26, 2022

+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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants