Sometimes, we want to fix the “Property does not exist on type ‘Vue’” error.
In this article, we’ll look at how to fix the “Property does not exist on type ‘Vue’” error.
How to fix the “Property does not exist on type ‘Vue’” error?
To fix the “Property does not exist on type ‘Vue’” error, we can add the missing property into TypeScript type definition file.
For instance, in vue-file-import.d.ts, we add
declare module "*.vue" {
import Vue from "vue";
export default Vue;
}
to add the type definition for .vue files by exporting Vue as a default export within the declare module statement.
Conclusion
To fix the “Property does not exist on type ‘Vue’” error, we can add the missing property into TypeScript type definition file.