[Bug Report] Could not find a declaration file for module 'vuetify/lib'
See original GitHub issueVersions and Environment
Vuetify: 1.3.15 Vue: 2.5.17 Browsers: Google Chrome OS: Windows 10
Steps to reproduce
Hi guys, I follow the Vue-CLI 3 guide and when I try to compile the source code the terminal show me a Typescript error.
$ vue create my-app
$ cd my-app
$ vue add vuetify
$ npm run serve
Expected Behavior
The Typescript code should compile.
Actual Behavior
2:21 Could not find a declaration file for module 'vuetify/lib'. 'C:/project/path/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 | import 'vuetify/src/stylus/app.styl'
4 |
5 | Vue.use(Vuetify, {
Reproduction Link
https://codepen.io/MatiasOlivera/pen/JwbQqy
Other comments
Typescript: 3.2.2
Issue Analytics
- State:
- Created 5 years ago
- Reactions:62
- Comments:19 (3 by maintainers)
Top Results From Across the Web
Could not find a declaration file for module 'vuetify/lib/framework'
When I execute command npm run serve there is above error: 2:21 ...
Read more >Could not find a declaration file for module 'vuetify/lib/framework'
Coding example for the question Could not find a declaration file for module 'vuetify/lib/framework'-Vue.js.
Read more >Frequently asked questions — Vuetify
I'm seeing Error in ./node_modules/vuetify/src/dir/file. js Module parse failed: Unexpected token (<lineno>:<characterno>) in the terminal. If ...
Read more >angular 2 could not find a declaration file for module 'date-fns'.
Fix error: Could not find a declaration file for module ... implicitly has an 'any' type.Try npm install library-name if it exists or...
Read more >[error] Could not find a declaration file for module 'vuetify/lib'
[error] Could not find a declaration file for module 'vuetify/lib' ... tsconfig.js >types 에 "veutify"를 추가하면 된다. "types": ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@KaelWD Thank you for the link. More specifically, this comment helped me out to properly update my tsconfig.json:
In our projects, we use
vue add vuetify
approach to add Vuetify into our project.The generated file
plugins/vuetify.ts
has this line:import Vuetify from 'vuetify/lib';
remove the
/lib
from toimport Vuetify from 'vuetify';
it will solve the issue. 🥂
if you are looking for a-la-carte installation please read: this