Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find a declaration file for module 'vuetify/lib/framework'

When I execute command npm run serve there is above error:

2:21 Could not find a declaration file for module 'vuetify/lib/framework'. 'C:/Users/valut/source/repos/BricksDryierClient/client-app/node_modules/vuetify/lib/framework.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/framework';`       
    1 | import Vue from 'vue';
  > 2 | import Vuetify from 'vuetify/lib/framework';
      |                     ^
    3 | 
    4 | Vue.use(Vuetify);
    5 | 

I tried to add vuetify to compilerOptions.types in tsconfig.json, but it isn't help.

like image 312
Leszek Mazur Avatar asked Oct 16 '25 16:10

Leszek Mazur


1 Answers

You should change the second line in src/plugins/vuetify.ts from:

import Vuetify from 'vuetify/lib/framework';

to:

import Vuetify from 'vuetify/lib';
like image 200
Leszek Mazur Avatar answered Oct 18 '25 09:10

Leszek Mazur



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!