Closed NathanAP closed 1 month ago
The same error was encountered, typecript^5.6.2, vue-tsc^2.1.6, vuetify^3.7.2 The error is as follows:
Return type of exported function has or is using name 'StrategyProps' from external module "node_modules/vuetify/lib/components/index" but cannot be named.
According to the prompt, the StrategyProps
interface is not exported, so it needs to be exported.
I found the StrategyProps
interface by modifying node_modules/vuetify/lib/components/index.d.mts and exported it through export
As follows:
export interface StrategyProps {
locationStrategy: keyof typeof locationStrategies | LocationStrategyFn;
location: Anchor;
origin: Anchor | 'auto' | 'overlap';
offset?: number | string | number[];
maxHeight?: number | string;
maxWidth?: number | string;
minHeight?: number | string;
minWidth?: number | string;
}
The 'ts' configuration attempt is invalid. I can only modify its type file and patch it. I don't know if there is any other way to solve this problem, but I can only do this at present.
I'll close this one because I got an answer from Vuetify team in the original post.
Vue - Official extension or vue-tsc version
2.1.6
VSCode version
1.91.1
Vue version
3.5.7
TypeScript version
5.6.2
System Info
package.json dependencies
Steps to reproduce
This is a copy of this because I don't think this is Vuetify fault (probably is mine of course).
Since one or two days ago, when I run
npm run build
, I'm getting this:I started to search for what it could be causing it, but I could not find anything. Today I tried to remove part of the code and when I remove my
slot
, it stop throwing error (one of them at least). I'm not sure what could be causing it. Here's the code of one of them:What is expected?
npm run build show build my project.
What is actually happening?
It throws ts#4058 on
vue-tsc --noEmit
step.Link to minimal reproduction
No response
Any additional comments?
No response