Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(language-core): refer absolute path of global types file #4924

Merged
merged 5 commits into from
Oct 25, 2024

Conversation

depressedX
Copy link
Contributor

fix #4860

Check the detail info here
#4860 (comment)

Solution

Change globalTypes reference to absolute path:

before:

/// <reference types=".vue-global-types/vue_3.4_false.d.ts" />

after:

/// <reference types="/absolute/path/to/.vue-global-types/vue_3.4_false.d.ts" />

Copy link

pkg-pr-new bot commented Oct 15, 2024

Open in Stackblitz

vue-component-meta

pnpm add https://pkg.pr.new/vuejs/language-tools/vue-component-meta@4924

vue-component-type-helpers

pnpm add https://pkg.pr.new/vuejs/language-tools/vue-component-type-helpers@4924

@vue/language-core

pnpm add https://pkg.pr.new/vuejs/language-tools/@vue/language-core@4924

@vue/language-plugin-pug

pnpm add https://pkg.pr.new/vuejs/language-tools/@vue/language-plugin-pug@4924

@vue/language-server

pnpm add https://pkg.pr.new/vuejs/language-tools/@vue/language-server@4924

vue-tsc

pnpm add https://pkg.pr.new/vuejs/language-tools/vue-tsc@4924

@vue/language-service

pnpm add https://pkg.pr.new/vuejs/language-tools/@vue/language-service@4924

@vue/typescript-plugin

pnpm add https://pkg.pr.new/vuejs/language-tools/@vue/typescript-plugin@4924

commit: ccf6506

@depressedX
Copy link
Contributor Author

@KazariEX noticed you've fixed serveral issues about globalTypes. So could you help checking these changes?

@KazariEX
Copy link
Collaborator

Can we centralize the operations of obtaining path and writing data in the same function setupGlobalTypes?

KazariEX
KazariEX previously approved these changes Oct 15, 2024
@KazariEX KazariEX enabled auto-merge (squash) October 15, 2024 06:26
@KazariEX KazariEX changed the title fix(language-core): can not reference .vue-global-types/vue_3.4_false.d.ts in monorepo, causing vue-tsc error fix(language-core): refer absolute path of global types file Oct 15, 2024
@Mivik
Copy link

Mivik commented Oct 27, 2024

For me this fix introduced the exact same problem instead of fixing it. Downgrading to vue-tsc 2.1.6 resolves the issue for me.

error TS2688: Cannot find type definition file for '/path/to/project/node_modules/.vue-global-types/vue_3.5_false.d.ts'.

30 /// <reference types="/path/to/project/node_modules/.vue-global-types/vue_3.5_false.d.ts" />

@depressedX
Copy link
Contributor Author

For me this fix introduced the exact same problem instead of fixing it. Downgrading to vue-tsc 2.1.6 resolves the issue for me.

error TS2688: Cannot find type definition file for '/path/to/project/node_modules/.vue-global-types/vue_3.5_false.d.ts'.

30 /// <reference types="/path/to/project/node_modules/.vue-global-types/vue_3.5_false.d.ts" />

Could you provide more details to reproduce your error?

@Mivik
Copy link

Mivik commented Oct 28, 2024

global

Minimal reproducible project: https://github.com/Mivik/vue-lang-tool-reproduce

@NicolasPL64
Copy link

Hopefully this gets pushed soon. I cannot use GitHub Actions for Ubuntu because of this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error TS2688: Cannot find type definition file for '.vue-global-types/vue_3.5_false.d.ts'
5 participants