question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug Report] Could not find a declaration file for module 'vuetify/lib'

See original GitHub issue

Versions 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:closed
  • Created 5 years ago
  • Reactions:62
  • Comments:19 (3 by maintainers)

github_iconTop GitHub Comments

190reactions
Al-uncommented, Apr 6, 2019

@KaelWD Thank you for the link. More specifically, this comment helped me out to properly update my tsconfig.json:

"compilerOptions": {
  "types": ["...", "vuetify"],
27reactions
ferrywltocommented, Aug 9, 2019

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 to import Vuetify from 'vuetify';

it will solve the issue. 🥂

if you are looking for a-la-carte installation please read: this

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found