Reputation: 183
My vscode vetur plugin is marking the first line of vue files as an error. This is the code using a completely blank .vue file template
<template>
<div>
</div>
</template>
<script>
export default {
}
</script>
<style scoped>
</style>
However the <template> line is marked as an error. Here is the error message:
Argument of type '{}' is not assignable to parameter of type 'new (...args: any[]) => any'.
Type '{}' provides no match for the signature 'new (...args: any[]): any'. Vetur(2345) [1,1]
I have confirmed that vetur is the only plugin doing anything on .vue files by disabling all other plugins
My vscode info is here:
Version: 1.47.2
Commit: 17299e413d5590b14ab0340ea477cdd86ff13daf
Date: 2020-07-15T18:22:15.161Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 5.4.0-42-generic
And I am using Vetur 0.25.0
I am completely stumped on what could be causing this. Not having intellisense and code completion due to this is driving me crazy
Upvotes: 3
Views: 4700
Reputation: 517
This is an old issue, as you can see in this GitHub thread: Vetur- Template interpolation error...
You can try one of the workarounds proposed there: alukos commented on 27 Sep 2019
Or you can try to change Vetur config via settings or via vetur.config.js file setting templateInterpolationService to false as @Jaideep Heer said.
"vetur.experimental.templateInterpolationService": false
Restart editor to take full effect, and the error should disappear.
Regards.
Upvotes: 0
Reputation: 520
Disable experimantal template interpolation in veutr extenssion settings,
"vetur.experimental.templateInterpolationService": false
Upvotes: 3
Reputation: 9
I did not spent time to figure out the root cause, but removing the .vscode folder solved it in my case.
Upvotes: 0