Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

418
Vistas
Vue 3 TypeScript - Problem with `App.vue` in `main.ts` and Tests

I'm using TypeScript with Vue and I'm facing this error from my main.ts file.

Error Information

Here's my shims-vue.d.ts file:

/* eslint-disable */
declare module "*.vue" {
    import type { DefineComponent } from "vue";
    const component: DefineComponent<{}, {}, any>;
    export default component;
}

My App.vue is just a simple template without any script or style:

<template lang="pug">
router-view
</template>

I do not want to do the "noImplicitAny": false in tsconfig.js, so is there any solution to this problem apart from that?

Also, same thing happens in test cases,

import { shallowMount } from "@vue/test-utils";
import Layout from "@/plugin/layout/Layout.vue";

describe("Layout.vue", () => {
    it("renders props.msg when passed", () => {
        const wrapper = shallowMount(Layout);
        expect(wrapper.text()).toMatch("sidebar");
    });
});

Error is: enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The reason for the error is that you named your vue file App.vue.js.

The solution: rename App.vue.js to App.vue

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda