I created a new vue project and after that i added vuetify,
$ vue create my-app
$ cd my-app
$ vue add vuetify
$ npm run serve
then i got this error
ERROR in /home/ruhith/Documents/vue/file upload/fileupload/src/plugins/vuetify.ts(2,21):
2:21 Could not find a declaration file for module 'vuetify/lib'. '/home/ruhith/Documents/vue/file upload/fileupload/node_modules/vuetify/lib/index.js' implicitly has an 'any' type.
Try `npm install @types/vuetify` if it exists or add a new declaration (.d.ts) file containing `declare module 'vuetify/lib';`
1 | import Vue from 'vue';
> 2 | import Vuetify from 'vuetify/lib';
| ^
3 |
4 | Vue.use(Vuetify);
5 |
Version: typescript 3.8.3
Time: 2774ms
what did i missed here?is this a bug in vuetufy?
You need to add vuetify's types to tsconfig.json, like this:
// tsconfig.json
{
"compilerOptions": {
"types": ["vuetify"]
}
}
Taken from FAQ here: https://vuetifyjs.com/en/getting-started/frequently-asked-questions/#questions
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With