question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Linting / error-checking running VERY slowly

See original GitHub issue
  • 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

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
yoyoyscommented, Apr 16, 2019

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

2reactions
yoyoyscommented, Apr 12, 2019

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lint Performance Tips - Google Groups
Lint tends to get slower for every release. There's a reason for that: It keeps checking more and more things (as of 3.3...
Read more >
xcode doesn't show compiler errors… | Apple Developer Forums
Here are no solutions, but 4 things to look at: 1. Sometimes Xcode is just very, very slow in getting error messages to...
Read more >
Using Prettier and ESLint to automate formatting and fixing ...
Learn how to use ESLint and Prettier together to automatically format and fix JavaScript code in your projects.
Read more >
Why Is VSCode Typescript Linting So Damn Fast?
Linting => Type Checking => Compiling. Turns out, most people won't run into this slowness unless they enable certain eslint options in ......
Read more >
Working with JavaScript in Visual Studio Code
Many popular libraries ship with typings files so you get IntelliSense for ... Run npm --version from a terminal or command prompt to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found