Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

325
Visualizações
Vetur error 2300 Duplicate identifier '(Missing)'

I'm having this weird error with Vetur in a typescript nuxt.js application. It shows this error message on the first line of all the components whether it's an empty line or has the tag.

I'm not sure when this error started to appear or what does it even mean?

Duplicate identifier '(Missing)'

Any help will be appreciated, thanks a lot!

about 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

The accepted answer is like chopping your arm off when your finger hurts! If you disable templateInterpolationService you lose a big part of the value of Vetur.

For me Vetur v0.35.0 broke when I upgraded typescript > 4.4

You can check which version(s) of typescript you're using by typing npm ls typescript in your project root.

If you're running typescript 4.4.4 (or lower), try this:

Restart Vue Lanaguage Server (in VSCode):
View ->
   Command Palette.. ->
      Vetur:Restart VLS (Vue Language Server)

If you're running typescript 4.5 or higher, you will probably run into this error. Still working to find a fix in this case.

Alternatively, to force your environment to use an older version of typescript across the board, you can ensure your version of npm is 8.3+ and use the new "overrides" section of package.json:

...
  "overrides": {
    "typescript": "4.4.4"
  },
...
about 4 years ago · Santiago Trujillo Relatório

0

So it turned out that this was because of Vetur experimental templateInterpolationService property. By turning it to false in the vetur.config.js file:

module.exports = {
  settings: {
    /* .. */
    'vetur.experimental.templateInterpolationService': false
    /* .. */
  }
};

Vetur stopped the unexpected interference with my components.

about 4 years ago · Santiago Trujillo Relatório

0

Making sure the gloabal ts version of vscode <=4.4.4. It may be some dependences(like @microsoft/api-extractor) using a newer typescript .

Creating vetur.config.js. Setting "vetur.useWorkspaceDependencies": "false" in settings. example:

module.exports = {
    settings: {
        "vetur.useWorkspaceDependencies": false,
        "vetur.experimental.templateInterpolationService": true
    }
}

Checking vscode OUTPUT panel in Vue Language Server, may:

[INFO ] Find node_modules paths in xxxxxxx - 247ms
[INFO ] Loaded bundled typescript@4.4.4.
[INFO ] Loaded bundled prettier.
[INFO ] Loaded bundled @starptech/prettyhtml.
[INFO ] Loaded bundled prettier-eslint.
[INFO ] Loaded bundled prettier-tslint.
[INFO ] Loaded bundled stylus-supremacy.
[INFO ] Loaded bundled @prettier/plugin-pug.

Success!

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda