`Cannot find name defineProps` ts error
See original GitHub issueIn a vue2 + vite + unplugin-vue2-script-setup project i have a ts error (not eslint) on build that Cannot find name defineProps/defineEmits
Here’s project’s tsconfig https://github.com/jacekkarczmarczyk/rachunek/blob/master/tsconfig.json and example usage of defineProps https://github.com/jacekkarczmarczyk/rachunek/blob/master/src/components/BillForm/BillForm.vue#L163 (that’s not a minimal repro, but I guess just the settings files are imporant, if you want a minimal repro though let me know)
To reproduce the issue run yarn build
Error can be supressed with // @ts-ignore
but that doesn’t sound like a valid solution. Another option is to add .d.ts files with defineProps
declaration but I think that should be rather provided by the lib (or maybe it is but can’t find anything)
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top GitHub Comments
hm what is https://github.com/johnsoncodehk/volar then?nvm, I see now still i think that putting information about dependency in theIDE
section is misleading, writing about Vetur, Volar and VS Code in one sentence may make people think that it’s about using Volar extension in VS CodeIt happens to me because I didn’t give it
npm install
, but then you have to disabled Vetur if you have it installed