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

255
Views
How to avoid the "requested module does not provide an export named" error in typescript + Vue 3?

I have this interface:

Product.ts

import { Category } from "@/Models/Category";

export interface Product {
    id: number;
    name: string;
    slug: string;
    description: string;
    price: number;
    categories: Category[];
    quantity: number;
}

and Category.ts

import { Product } from "@/Models/Product"

export interface Category {    
    id: number
    name: string
    slug: string
    // relations
    products: Product[]   
}

And then I am getting this error:

Uncaught SyntaxError: The requested module '/src/Models/Product.ts?t=1654212769656' does not provide an export named 'Product' (at Category.ts:1:1)

I try to solve using export default, and remove the brackets in the file that is importing, but the error remains, what can I do?

This is my tsconfig.json

{
  "extends": "@vue/tsconfig/tsconfig.web.json",
  "include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
  "compilerOptions": {    
    "baseUrl": ".",
    "paths": {
      "@/*": ["./src/*"]
    }        
  },

  "references": [
    {
      "path": "./tsconfig.vite-config.json"
    }
  ]
}

Thanks.

about 4 years ago · Juan Pablo Isaza
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!