I'm new to VUE.js and to Ionic and I'm having an intermittent issue while serving locally the project using "ionic serve".
When the server tries to compile the project, it seems that sometimes it doesn't apply to "shims-vue.d.ts" code, to transform the vue files into components..., causing the above error.
Contents of the shims-vue.d.ts
declare module '*.vue' {
import { defineComponent } from 'vue'
const component: ReturnType<typeof defineComponent>
export default component
}
I have no idea why or what to do.
There are ways to patch this...
To continue to use defineComponent in each file...
To force recompilation on each failing file. Personally I remove/add the 'lang="ts"' property from the script tag to force recompilation and then, it compiles properly...
It happens only to some files and I have no idea why. I have found no logic behind the failures yet...