Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

419
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!