I am aware there are many similar issues, but most of them are simply due to forgetting to add "auto-imports.d.ts" to the include array in tsconfig, or forgetting to run yarn vite first to generate auto-imports.d.ts before running yarn build.
Unlike those cases, I have already included auto-imports.d.ts in tsconfig (tsconfig.app.json) and have also executed yarn vite to generate the file beforehand.
However, when I run the type-check command (vue-tsc --build), I still encounter a large number of errors such as error TS2304: Cannot find name 'xxxx'.
Neither yarn vite nor yarn vite build reports any errors; the error only occurs with vue-tsc --build.
Here is a minimal, reproducible online project: https://stackblitz.com/edit/vitejs-vite-tpsoknq9?file=src%2Fviews%2FHome%2FHome.vue&view=editor
You can try the following commands:
yarn dev
yarn build-only
yarn type-check
I am aware there are many similar issues, but most of them are simply due to forgetting to add
"auto-imports.d.ts"to theincludearray intsconfig, or forgetting to runyarn vitefirst to generateauto-imports.d.tsbefore runningyarn build.Unlike those cases, I have already included
auto-imports.d.tsintsconfig (tsconfig.app.json)and have also executedyarn viteto generate the file beforehand.However, when I run the type-check command (
vue-tsc --build), I still encounter a large number of errors such aserror TS2304: Cannot find name 'xxxx'.Neither
yarn vitenoryarn vite buildreports any errors; the error only occurs withvue-tsc --build.Here is a minimal, reproducible online project: https://stackblitz.com/edit/vitejs-vite-tpsoknq9?file=src%2Fviews%2FHome%2FHome.vue&view=editor
You can try the following commands:
yarn devyarn build-onlyyarn type-check