dependent-tan
dependent-tan11mo ago

Refine lib error on build

I have this error when I try to build my project :
package.json (scripts)
...
"build": "tsc && refine build",
...
package.json (scripts)
...
"build": "tsc && refine build",
...
My TSConfig :
{
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"baseUrl": ".",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
},
"include": ["src", "vite.config.ts"],
"exclude": ["node_modules"]
}
{
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"baseUrl": ".",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
},
"include": ["src", "vite.config.ts"],
"exclude": ["node_modules"]
}
nodemodules/.pnpm/@refinedev+core@4.26.4@tanstack+react-query@4.29.19@types+react-dom@18.2.6@types+react@18._mnfh3fak7vaevi6v64qrvswy3m/node_modules/@refinedev/core/src/interfaces/bindings/resource.ts:3:26 - error TS2307: Cannot find module 'src/interfaces' or its corresponding type declarations. 3 import { ILogData } from "src/interfaces"; ~~~~ Found 1 error in nodemodules/.pnpm/@refinedev+core@4.26.4@tanstack+react-query@4.29.19@types+react-dom@18.2.6@types+react@18._mnfh3fak7vaevi6v64qrvswy3m/node_modules/@refinedev/core/src/interfaces/bindings/resource.ts:3
2 Replies
kapa.ai
kapa.ai11mo ago
Hi @realdragonma. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the information provided in the extracts, it seems like you're trying to build a TypeScript project with refine. The error message indicates that TypeScript is unable to find the module 'src/interfaces'. This could be due to a variety of reasons such as incorrect path, missing files, or incorrect configuration. However, the extracts do not provide specific information on how to resolve this particular error. It's recommended to check your project structure and ensure that the 'src/interfaces' module exists and is correctly referenced in your code. If you're still facing issues, you might want to consider using tsup (https://github.com/egoist/tsup) for building your TypeScript applications as mentioned in the extract (https://refine.dev/blog/what-is-esbuild). It uses esbuild behind the scene and requires minimal configuration. If the issue persists, you may want to check the official refine documentation or seek help from the community. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai11mo ago
<@214840332943097856> kapa.ai is still learning and improving, please let us how it did by reacting below