Persistent Error Message Unaffected by Code Modifications and Removal - Expected Behavior Not Met
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.
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
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.