Subscribe on changes!

Persistent Error Message Unaffected by Code Modifications and Removal - Expected Behavior Not Met

avatar
Nov 20th 2023

Vue version

3.3.4

Link to minimal reproduction

https://codepen.io/goktugerol-dev/pen/zYeWrPx

Steps to reproduce

Problem: I had some code that was giving me an error:

<script setup lang="ts">
import { ref, ....other stuff} from 'vue';

const isDarkMode = ref(false);

const toggleDarkMode = () => {
  isDarkMode.value = !isDarkMode.value;
  document.documentElement.classList.toggle('dark', isDarkMode.value);
};
</script>

So I noticed that the error message should reflect the changes made to the code, disappearing once the related code is removed. image

What is expected?

The error message should reflect the changes made to the code, disappearing once the related code is removed.

What is actually happening?

The error message never changes even after making some modifications. Consequently, I removed the related code completely, saved the file, reopened VS Code, and found that the error message persists despite removing the related code.

System Info

Linux Arch / Windows 11.

Any additional comments?

No response

avatar
Nov 21st 2023

This looks more like a VSCode bug than a Vue issue. Or it could be related to https://github.com/vuejs/language-tools - but we won't be able to investigate without a proper reproduction. The specific VSCode version and Volar extension version may help.

avatar
Nov 21st 2023

Hi Evan, the VS Code team has reviewed the issue and determined that it is caused by Volar. It would be better to continue fixing the issue from Volar's repository. You can go ahead and close the issue since it is unrelated.