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

No default export while using setup sugar #3116

Closed
2 tasks done
wiketool opened this issue Aug 17, 2021 · 5 comments
Closed
2 tasks done

No default export while using setup sugar #3116

wiketool opened this issue Aug 17, 2021 · 5 comments

Comments

@wiketool
Copy link
Contributor

  • I have searched through existing issues
  • I have tried restarting VS Code or running Vetur: Restart VLS

Info

  • Platform: Windows 10 Professional Edition 20H2 x64
  • Vetur version:v0.34.1
  • VS Code version:1.59.0
  • Node.js version:14.16.0

Problem

I used setup sugar in my code,then Vetur report error Module xxx has no default export

Reproducible Case

HelloWorld.vue

...
<script lang="ts" setup>
import { ref } from 'vue'

defineProps({
  msg: {
    type: String,
    required: true,
  },
})

const count = ref(0)
</script>
...

Home.vue

...
<script lang="ts">
...

/*The following line is where error report*/
import HelloWorld from '@/components/HelloWorld.vue' 

...
</script>
...
@coderlfm
Copy link

I had the same problem

1 similar comment
@nevermore1000
Copy link

I had the same problem

@nopeless
Copy link

nopeless commented Sep 4, 2021

same problem here as well

@ZangYuSong
Copy link

I had the same problem

@yoyo930021
Copy link
Member

Duplicate of #2296

@yoyo930021 yoyo930021 marked this as a duplicate of #2296 Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants