v3.2.26 causes many type errors
Version
3.2.26
Steps to reproduce
Hello!
After I upgraded the current project to Vue 3.2.26, I've started to get many type errors from vue-tsc
after build.
The errors look like that:
What is expected?
No type errors
What is actually happening?
Many TypeScript-related errors appear as a result of vue-tsc
command
I am not able to provide the reproduction. Could you please advise what may be the issue here?
Apart from i18n errors, I also get some for vm.$route
etc.
from v3.2.25. It seems that some type-related changes caused that. Unfortunately, I could not reproduce it within a new Vite project. All seems to work fine from scratch.
From the console in the current project, I can see that the errors are all about root Vue instance properties: $t, $route, etc
According to the changes in v3.2.26, maybe you may know what could cause this? vue-tsc
didn't report any TS issues while using v.3.2.25 and after v3.2.26 is installed, I get those TS errors from vue-tsc
Can you maybe share a more detailed list of "those TS errors" and your ev.d.ts file which you may have altered?
@LinusBorg the code base is quite large and the amount of errors is huge - more than 1700 items. Maybe all of them are about $t
function call and a few about $route
reference. See the attached screenshot.
Typing of these global properties by third party packages happens by augmenting the CustomComponentProperties
interface, see for example vue-router here
But The changes between .25 and .26 don't affect this interface, so it's really hard to make sense of this with this little information and no access to any code, nor a reproduction.
I assume you have done npm's equivalent of turing it off and on again - deleting the lockfile and reinstalling all packages?
@LinusBorg @yyx990803 it turned out to be a problem with pnpm
. We migrated to this package manager recently and we had no issues until now. When we update dependencies (not only Vue as it turned out
to be) to their newer versions, there appear the errors from vue-tsc
while running the build command with Vite. I don't know how and why is that happening and I also could not reproduce that in the new project generated from scratch. It seems to be an issue with the dependencies installation on pnpm i
. Migration to yarn
or npm
fixes my issue. Thanks for your answers