vuetify: [Bug Report][3.7.1] Regression: can no longer generate declarations
Environment
Vuetify Version: 3.7.1 Last working version: 3.7.1 Vue Version: 3.5.6
Steps to reproduce
- clone repo
- run
npx vue-tsc --noEmit
Expected Behavior
This should not fail and used to work in vue ~3.4.0
Actual Behavior
This fails with: Default export of the module has or is using private name 'FilterPropsOptions'. and Default export of the module has or is using private name 'ThemeInstance'
Reproduction Link
https://github.com/bkuster/vuetify-typedeclaration
Other comments
In a way larger project, we require the use of declarations. Furthermore, do to deployment schemes, we do not use the unplugin-vue-components/vite in our vite configuraion, and thus require an import of the veutify components.
If used with defineComponents syntax, which almost all of our code base is, this will throw the above mentionend TS error as of vue ^3.5.0. This seems to work as expected using a setup script.
This may be related to this: https://github.com/vuejs/language-tools/issues/1232?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 10
- Comments: 17 (2 by maintainers)
Commits related to this issue
- fix(types): optimise build (#20484) Fixes #20480 — committed to vuetifyjs/vuetify by KaelWD 2 years ago
downgrading vue-tsc to 2.1.10 instead 2.2.0 works for me
Downgrading the official Vue extension in VS Code to 2.2.0 did the trick for me. Changing vue-tsc in my package.json did nothing.
any news on this? we are facing that as well. as soon as we use a template-ref on a vuetify component we see this errors and our build pipeline fails.
hmm, updating vue-tsc to 2.2.4 does not help, we still get the same error in the example Project. @KaelWD
It’s a shame that this issue was closed but not fixed - after exhaustive testing I have only three options; remove vuetify, remove any v-form instances or downgrade vuetify to v3.4.0.
I hit this with something as simple as just using
VFormon the type of the the submit event callback, it seems that we have an un-exportedSubmitEventPromiseinvuetify/lib/components/index.d.mts, and an exported one invuetify, which is indeed wrong and is what causing this error. This is likely coupled with some change in the Vue template compiler that was done at some point which then triggers this error.Guys downgrading the Vue extension Vue.volar to 2.1.10 works!
We downgraded the version of
vue-tscto2.1.10and also downgraded the Vue extensionVue.volarto the same version, which resolved the issue. We recommend aligning the package version with the extension version.