[ERROR] All files must be modules when the '--isolatedModules' flag is provided (ok)

https://stackoverflow.com/questions/62982647/getting-error-all-files-must-be-modules-when-the-isolatedmodules-flag-is-p

C:\Users\Administrator\Desktop\typescript\src\pages\Product\ProductItem\index.tsx

export default {}
"isolatedModules": true,

C:\Users\Administrator\Desktop\typescript\tsconfig.json

{
  "compilerOptions": {
    "target": "es5",
    "lib": [
      "dom",
      "dom.iterable",
      "esnext"
    ],
    "allowJs": true,
    "skipLibCheck": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noImplicitAny": false,
    "noEmit": true,
    "jsx": "react"
  },
  "include": [
    "src"
  ]
}

Last updated

Was this helpful?