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

554
Views
Typescript - TS1192: Module has no default export

I am developing application in vue3 with typescript support. I do not know why but every time I compile code with npm it shows me this:

TS1192: Module '"/home/admin/Desktop/projects/myProj/frontend/components/SectionTitle.vue"' has no default export.

by the way I have enabled allowSyntheticDefaultImports in my tsconfig.json

"compilerOptions": {
        "outDir": "dist",
        "removeComments": true,
        "lib": ["DOM", "ES2020", "ES2020.Promise"],
        "module": "es2020",
        "target": "es2015",
        "allowJs": true,
        "jsx": "preserve",
        "moduleResolution": "node",
        "allowSyntheticDefaultImports": true,
    },
webpack version: 5.50.0
typescript version: 2.8.3

How do I export components

export default defineComponent({
...
})
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Try

const component = defineComponent({
    
    })
    
export default component;

about 4 years ago · Juan Pablo Isaza Report

0

Install typescript 4.3.2

package.json

"typescript": "4.3.2",
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!