vetur: Linting / error-checking running VERY slowly

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: Windows 10
  • Vetur version: 0.18.1
  • VS Code version: 1.33.1

I am also writing the code in TypeScript, latest version.

Problem

When writing code in .vue files, the error-checking functionality lags massively. Screenshot – note how the error doesn’t recognise the entire string (it takes many seconds to recognise it all).

In the Vue Language Server panel I get this output:

Vetur initialized
[Error - 09:29:27] Request textDocument/codeAction failed.
  Message: Request textDocument/codeAction failed with message: Debug Failure. Invalid cast. The supplied value [object Object] did not pass the test 'isStringLiteral'.
  Code: -32603 
[Error - 09:29:44] Request textDocument/codeAction failed.
  Message: Request textDocument/codeAction failed with message: Debug Failure. Invalid cast. The supplied value [object Object] did not pass the test 'isStringLiteral'.
  Code: -32603

Reproducible Case

Open up a .vue file in VS Code with Vetur installed which has <script lang="ts">...</script> and write some code, anything at all which should have errors. The error-checking / linting displays, such as the red underline and the popup when you hover over the bad code, will take a long time to recognise all of the error.

EDIT: Here is a picture showing how much CPU power and RAM VS Code is taking up when Vetur is in the process of error-checking: https://i.imgur.com/at1ikdf.png

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 13
  • Comments: 28 (9 by maintainers)

Most upvoted comments

I’m using typescript too, my teammate notice me that if a <script lang="ts"> block exists, then computer will keep burning.

After update to the latest version, I have the same problem too.

@yoyoys I know…Just to see if it breaks Vetur features. If it doesn’t I’ll need to read the list of files to process in Vetur not from jsconfig/tsconfig.

@tedjenkins I have a feeling the perf issues are caused by your PHP extensions rather than Vetur. Can you run the command “Process Explorer” in VS Code to see which one is causing cpu/memory usage?

I do not use PHP extensions but I still get the same problems too. I am using within <script lang="tsx"> block ts version: 3.1.6 (using workspace version) vscode version: 1.33.1 vetur version: 0.18.1