My Vue 3 project, which incorporates TypeScript, is encountering an issue when I attempt to execute vue-tsc --noEmit
.
error TS6504: File '/proj/src/pages/Index.vue.__VLS_template.jsx' is a JavaScript file. Did you mean to enable the 'allowJs' option?
The file is in the program because:
Root file specified for compilation
error TS6504: File '/proj/src/pages/Index.vue.js' is a JavaScript file. Did you mean to enable the 'allowJs' option?
The file is in the program because:
Root file specified for compilation
error TS6504: File '/proj/src/pages/PassLayout.vue.__VLS_template.jsx' is a JavaScript file. Did you mean to enable the 'allowJs' option?
The file is in the program because:
Root file specified for compilation
error TS6504: File '/proj/src/pages/PassLayout.vue.js' is a JavaScript file. Did you mean to enable the 'allowJs' option?
The file is in the program because:
Root file specified for compilation
The files causing this issue, namely Index.vue
and PassLayout.vue
, do not contain <script>
sections; they only consist of <template>
.
PassLayout.vue
<template>
<router-view />
</template>
What could be the reason behind these errors?