skinny-azureS
Refine3y ago
25 replies
skinny-azure

Weird error in refine build

Hello, I have this error and I don't know what to do :
Failed to compile.

TS2307: Cannot find module 'src/interfaces' or its corresponding type declarations.
    1 | import { ReactNode, ComponentType } from "react";
    2 | import { UseQueryResult } from "@tanstack/react-query";
  > 3 | import { ILogData } from "src/interfaces";
      |                          ^^^^^^^^^^^^^^^^
    4 |
    5 | /**
    6 |  * Resource route components


My tsconfig / tsconfig.node.json

{
  "compilerOptions": {
    "target": "ESNext",
    "useDefineForClassFields": true,
    "lib": ["DOM", "DOM.Iterable", "ESNext"],
    "allowJs": false,
    "skipLibCheck": true,
    "esModuleInterop": false,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "module": "ESNext",
    "moduleResolution": "Node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react-jsx"
  },
  "include": ["src", "vite.config.ts"],
  "references": [
    {
      "path": "./tsconfig.node.json"
    }
  ]
}

{
    "compilerOptions": {
        "composite": true,
        "module": "ESNext",
        "moduleResolution": "node"
    },
    "include": ["vite.config.ts"]
}
Was this page helpful?