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

Typescript errors are no more showed in the terminal since vue-tsc 2 #4099

Closed
vidal7 opened this issue Mar 14, 2024 · 9 comments
Closed

Typescript errors are no more showed in the terminal since vue-tsc 2 #4099

vidal7 opened this issue Mar 14, 2024 · 9 comments
Labels
bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first upstream

Comments

@vidal7
Copy link

vidal7 commented Mar 14, 2024

Description

On vue-tsc 2.0.6, console output is empty reporting no typescript errors even if there is an error

Versions

  • vue-tsc@2.0.6
  • typescript@5.1.6
  • vue@2.7.14
  • node@20.10.0

Here is the error in vscode
image

What is happening?

The output of the terminal is empty
image

What should I expect

image

Steps to reproduce

@vidal7
Copy link
Author

vidal7 commented Mar 14, 2024

I can add that upgrading to typescript version 5.4.2, console now showing something but incomplete.

image

@vidal7 vidal7 changed the title Typescript errors are no more outputed in the terminal since vue-tsc 2 Typescript errors are no more showed in the terminal since vue-tsc 2 Mar 15, 2024
@AustinGrey
Copy link

Same issue, blank lines where the original code was supposed to be. Downgrade to vue-tsc 1.8.27 worked to restore the outputs in the console.

@johnsoncodehk johnsoncodehk added bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first labels Mar 20, 2024
@ArchiDevil
Copy link

Same issue on vue@3.4.21, typescript@5.1.6. Upgrading TS to 5.4.3 shows empty lines on some errors (some are still fine). Downgrading to 1.8.27 helps.

johnsoncodehk added a commit to volarjs/volar.js that referenced this issue Mar 28, 2024
@johnsoncodehk
Copy link
Member

Fixed by volarjs/volar.js@a414785

@so1ve so1ve added the upstream label Mar 28, 2024
johnsoncodehk added a commit to volarjs/volar.js that referenced this issue Apr 7, 2024
…162)

* fix(typescript): transform source file for tsc without `incremental`

refs vuejs/language-tools#4099

---------

Co-authored-by: Johnson Chu <johnsoncodehk@gmail.com>
@so1ve
Copy link
Member

so1ve commented May 29, 2024

We are using @volar/typescript v2

@mr-sanders
Copy link

mr-sanders commented May 29, 2024

@so1ve You're right, I've got confused with dependency versions when switched packages. I'll remove my previous comment. So then I still have an issue with the following versions:

  • vue-tsc@2.0.19 (with @volar/typescript@2.2.5)
  • vue@2.7.16
  • typescript@4.2.4
  • node@16.20.2 (the same for 18.17.1/20.12.0)

I tried to debug and found that the following catch swallows an error:

} catch (err) {
if (err === extensionsChangedException) {
main();
}
}

When I run

yarn run vue-tsc --noEmit

The issue it swallows is "createModuleResolutionCache is not defined". It fails in @volar/typescript here: https://github.com/volarjs/volar.js/blob/f17c19f712651acde33cc2171a112e64db0b460e/packages/typescript/lib/node/proxyCreateProgram.ts#L58

The best I found is that vue-tsc tries to call proxyCreateProgram via tsc and passes empty proxy object instead of ts with the required methods. Is this the same issue or a new one?

P.S.: version 1.8.27 works fine for me

@so1ve
Copy link
Member

so1ve commented May 30, 2024

Seemed that your typescript version is too old, could you please upgrade to v5 if possible?

@mr-sanders
Copy link

@so1ve you're right. This is the problem. It's working for v5.

Probably it makes sense to specify the minimum supported version in package.json or readme. I checked vue-tsc's peerDependencies, and it lists "typescript": "*"

@so1ve
Copy link
Member

so1ve commented May 31, 2024

Sure, PR welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first upstream
Projects
None yet
Development

No branches or pull requests

6 participants