Closed Mivik closed 3 weeks ago
Does the /path/to/project/node_modules/.vue-global-types/vue_3.5_false.d.ts
file exist on your file system?
If yes, you can reproduce the error by writing /// <reference types="/path/to/project/node_modules/.vue-global-types/vue_3.5_false.d.ts" />
in any .ts
file?
Okay, I narrowed down the issue. The path got automatically lowercased which causes the issue to happen only if the project path contains uppercase letters.
src/App.vue:8:23 - error TS2688: Cannot find type definition file for '/home/mivik/test/repro/node_modules/.vue-global-types/vue_3.5_false.d.ts'.
8 /// <reference types="/home/mivik/Test/repro/node_modules/.vue-global-types/vue_3.5_false.d.ts" />
Did you mean /// <reference types="/home/mivik/Test/repro/node_modules/.vue-global-types/vue_3.5_false.d.ts" />
case is correct, but somehow when type checking it converted to lowercase?
What is the typescript version in your node_modules? Will upgrading to the latest version solve the problem?
@Mivik can you help us remotely investigate this issue?
https://github.com/vuejs/language-tools/wiki/Help-Us-Investigate-Issues-Remotely
Did you mean
/// <reference types="/home/mivik/Test/repro/node_modules/.vue-global-types/vue_3.5_false.d.ts" />
case is correct, but somehow when type checking it converted to lowercase?What is the typescript version in your node_modules? Will upgrading to the latest version solve the problem?
Yes the path exists and it's converted to lowercase during type checking
Typescript version is 5.4.5.
BTW I think probably check #4924 since using absolute path for global types fixes a specific issue and switching back to relative path might break that promise.
This is due to the issue of inconsistent path resolving behavior caused by older versions of Typescript, which can result in incorrect lowercase path name in case sensitive systems.
This is due to the issue of inconsistent path resolving behavior caused by older versions of Typescript, which can result in incorrect lowercase path name in case sensitive systems.
So the solution is...? (also, is there any workaround for now?)
The fix has been released.
Vue - Official extension or vue-tsc version
2.1.8
VSCode version
1.94.2
Vue version
3.5.12
TypeScript version
5.4.5
System Info
package.json dependencies
Steps to reproduce
Use vue-tsc 2.1.8 and
type-check
the projectWhat is expected?
type-check
should run without errorsWhat is actually happening?
type-check
failed withSee https://github.com/vuejs/language-tools/pull/4924#issuecomment-2439996063
Link to minimal reproduction
https://github.com/Mivik/vue-lang-tool-reproduce
Any additional comments?
This issue was said to be fixed in https://github.com/vuejs/language-tools/pull/4924, however this PR introduced the very same problem for me. Using vue-tsc 2.1.6 does not yield this error.