Hello,
I used Vite to create a vue-typescript build but I’m getting an error and I can’t figure out what the problem is. Can you please help me with the meaning of the error?
Hello,
I used Vite to create a vue-typescript build but I’m getting an error and I can’t figure out what the problem is. Can you please help me with the meaning of the error?
Hola!! tengo el mismo error, has podido solucionarlo?
The problem is that your <script>
has the word setup in it. Replace with
<script lang="ts">
This is probably because you use export default defineComponent in script setup, where it is not needed. I got the same error as you when I tried to do it, but in only in VSCode for some reason.
Try to simplify it like this:
<script setup lang="ts">
import NavBar from './components/NavBar.vue'
</script>
no more code in script tag should be needed.