Skip to content

No error messages in template section #1441

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

Closed
Leon0402 opened this issue Jun 12, 2022 · 6 comments
Closed

No error messages in template section #1441

Leon0402 opened this issue Jun 12, 2022 · 6 comments
Labels
duplicate This issue or pull request already exists

Comments

@Leon0402
Copy link

I use https://github.com/johnsoncodehk/volar-starter to be sure to not have misconfigured anything and installed the normal volar & volar ts vs code extensions.

In general, there are no error messages about missing imports for components. For instance:

image

No error message about the missing HelloWorld import.

And if I don't use lang="ts" there are no error messages at all anymore. See the same example:

image

No error message about the missing prop.

@johnsoncodehk
Copy link
Member

Duplicate of #844

@johnsoncodehk johnsoncodehk marked this as a duplicate of #844 Jun 12, 2022
@johnsoncodehk johnsoncodehk added the duplicate This issue or pull request already exists label Jun 12, 2022
@Leon0402
Copy link
Author

@johnsoncodehk I don't understand why this is a duplicate?

In the explanation you mention that the extension is not able to show errors, which are a result of the wrong type. This make sense, because javascript doesn't have these types.
But in my explample, a prop is just missing and there is no error message for it. What is the explanation for this?

@johnsoncodehk
Copy link
Member

@Leon0402 You should config checkJs in tsconfig / jsconfig to enable type-checking for lang="js".

@Leon0402
Copy link
Author

@Leon0402 You should config checkJs in tsconfig / jsconfig to enable type-checking for lang="js".

Thanks this worked! It still doesn't find missing imports in the template section, but this seems to be true for typescript as well. I assume this is a different issue

@johnsoncodehk
Copy link
Member

@Leon0402 if you're using @vue/composition-api, see #1350.

@AdrianFahrbach
Copy link

AdrianFahrbach commented Jun 26, 2024

I think I got the same issue:
screenshot 2024-06-26 at 18 46 01@2x
Shouldn't test show an error here since it is not defined anywhere? I'm only using the Vue - Official plugin.

Nevermind! The issue was related to a styled-components plugin that broke the Vue plugins hybrid mode. I forcefully enabled it, because I thought the styled-components plugin was limited to React and therefore probably a false positive.
Everything is working fine now again.

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