-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug Report] Typescript 'vue add vuetify' creates non-functional project #43
Comments
same problem over here... probably because we are using the typescript plugin ? |
I need to finish #15 |
@KaelWD is there a workaround or something we can use in the mean time? |
@jappyjan while that is being worked out, I have been using the old way of doing things.
Then add the types individually:
|
I actually just added a bunch of /* @ts-ignore /* Statements ^^ Works kinda the same, with less code to write... |
lol yea that would do it, cheers |
@KaelWD it looks like that pull request got closed due to inactivity, is there another one that aims to fix typescript? |
The new error with, with a fresh build, with Vuetify loader is
I believe we just need to add some types and its good to go! |
It has types, the plugin just needs to add it to tsconfig. |
Thanks for helping me on Discord to fix it.
|
this solution did not work for me... still gettint warnings for every component of Vuetify im using... |
This worked for me. I imported |
No need to downvote... my fix is only for the single |
@praseodym importing vuetify instead of vuetify/lib will NOT be a la carte. The bundle size is bigger because it will import all of the components. |
I believe this is fixed now so I am closing |
It isn't, we still need to modify tsconfig. |
I ran into this problem today, with the latest vue/vuetify. @MisterGoodcat's fix worked for me. |
Is this solved yet? I'm new to Vuetify and Vue, however after I do
I tried @praseodym solution by changing However, as @amritk said, it will not be a-la-carte, and would be oversized, are there any solutions toward this if I want to use it a-la-carte? |
@jippy89 I faced the same issue and this documentation helped me. https://vuetifyjs.com/en/getting-started/quick-start Hope this helps. |
Why I cannot find type for VTextField anywhere ? |
@rene-dohan have you tried
That fixed it for me. |
Well no, I wanted to access it from typescript as reference and could not find type definition. |
just an FYI everyone. after you do vue create "my app", and then add vuetify, please be sure to run a "npm install". I had the error listed above: vuetify had modified the initial vue index page, but had no css applied. After running npm install, all the styles were there. |
I just ran into the issue of TypeScript not finding a definition for whatever is exported from Simply adding "vuetify" to the "types" field in my tsconfig fixed it as suggested here. But it seems like this is something that should happen when installing Vuetify, right? Here are my versions: |
closing this for now, feel free to re-open a new issue if you are still having problems |
Wanted to post a heads up and say that this error has happened to me with Typescript + ESLint under vue CLI 4. It's fixed by the manual tsconfig.json "types" fix posted above though. |
Yeah this is definitely not fixed. I just created a Vue typescript with ESLint project and did a vue add vuetify and still got this error. |
This has nothing to do with which linter is being used. It's a compiler issue (tsc) where imports from "vuetify/lib" fail, which is what you do for manual imports in a-la-carte. Just follow the official documentation in a TypeScript setup and the build will immediately fail. |
yeah something like #104 would have to land to help with this |
Same problem here when using the default preset. vue: 2.6.10 |
I found a way to workaround this bug in 'a-la-carte' setup. One need to change import from
After this manipulations you don't need to explicitly specify |
Just to let you know the same error still persist with a freshly created project. |
I created a import 'vuetify/types/lib.d'; |
Thanks @nvitaterna, This is the only fixed the resolved my issue, can you please tell if is this a workaround or fix? |
IIRC, the "types" option in "compilerOptions" is exclusive - so you would have to add other typings to that as well (the Typescript docs are hard to navigate right now with the new layout and I can't really find documentation on this). I prefer using a declaration file so it doesn't interfere with anything else. EDIT:
|
Oh, about that... Vue CLI somehow managed to litter in "types" with "webpack-env", so it is automatically exclusive to start with. |
tough landing, coming back to vuejs after some time has passed and hitting some long-term issue right after an awesome introduction video. anything I can help to iron this out? this is what fixed compile error for me:
|
Can one of the devs please tell whether this will be fixed anytime soon? Because it is easy to get vuetify running with typescript but not having a la carte is a no go. So would be nice to know for our upcoming projects whether we can use typescript or not. |
I had to put this into my
|
This worked for me too. Fresh Vue + Typescript project with vuetify added via |
Ubuntu 18.04
@vue/cli 3.0.4
➜ vue create v
➜ cd v
➜ vue add vuetify
➜ yarn serve
The text was updated successfully, but these errors were encountered: