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

Cryptic errors in default project, vanilla vue/typescript VScode environment #3972

Closed
thany opened this issue Mar 4, 2024 · 5 comments
Closed
Labels
duplicate This issue or pull request already exists

Comments

@thany
Copy link

thany commented Mar 4, 2024

TLDR: massive amount of vague/cryptic errors occur in the default initial project from npm create vue@latest in a basically vanilla vue & typescript environment.

I'm confused about the change of addons for VScode. It says in the changelog that Volar is deprecated, so I disabled it.
VScode is up to date at 1.87, and so is the "Vue - Official" addon at 2.0.4. No additional preferences pertaining to vue have been changed from their defaults.

I'm getting these weird errors in a super simple component:
image

The component:

<template>
  <input type="text" @keydown.enter="count++" />
  <p>value = {{ count }}</p>
</template>

<script setup lang="ts">
import { ref } from "vue";

const count = ref<number>(0);
</script>

Needless to say, this runs free of errors/warnings during compilation and at runtime. These errors are ONLY shown in VScode and nowhere else. What are they trying to tell me?

Worthy of note: this component has been put in the example app created by npm create vue@latest about two weeks ago. So to reproduce the problem, use that command. I just tried it myself, and the errors occur straight away after setting up the default/initial/example project using that command. Only options chosen: typescript and eslint. All other options were left default.

@mhm13dev
Copy link

mhm13dev commented Mar 4, 2024

I just scaffolded a new project today.

Vue Typescript and I am getting same errors in VS Code.

image

@thany
Copy link
Author

thany commented Mar 5, 2024

So I interpreted the confusing update around the VScode addons correctly, would you say?

@mhm13dev
Copy link

mhm13dev commented Mar 5, 2024

@thany yes it seems like an issue with VS Code extension.

@johnsoncodehk
Copy link
Member

Duplicate of #3942

@johnsoncodehk johnsoncodehk marked this as a duplicate of #3942 Mar 5, 2024
@johnsoncodehk johnsoncodehk added the duplicate This issue or pull request already exists label Mar 5, 2024
@mhm13dev
Copy link

mhm13dev commented Mar 5, 2024

For now I managed to suppress the errors by installing:

Vue - Official v1.8.27

And also

TypeScript Vue Plugin (Volar) v1.8.27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants