Build not working

Hey folks, I created a new project today using npm create refine-app@latest so I have following versions:
"@refinedev/antd": "^5.7.0",
"@refinedev/cli": "^2.7.4",
"@refinedev/core": "^4.28.2",
"@refinedev/inferencer": "^4.3.2",
"@refinedev/kbar": "^1.1.2",
"@refinedev/react-router-v6": "^4.1.0",
"@refinedev/antd": "^5.7.0",
"@refinedev/cli": "^2.7.4",
"@refinedev/core": "^4.28.2",
"@refinedev/inferencer": "^4.3.2",
"@refinedev/kbar": "^1.1.2",
"@refinedev/react-router-v6": "^4.1.0",
I'm using vite and antd with yarn. I can run yarn dev without any issues but if I try running yarn build I get following issue:
yarn build
yarn run v1.22.19
$ tsc && refine build
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 node_modules/@refinedev/core/src/interfaces/bindings/resource.ts:3

error Command failed with exit code 2.
yarn build
yarn run v1.22.19
$ tsc && refine build
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 node_modules/@refinedev/core/src/interfaces/bindings/resource.ts:3

error Command failed with exit code 2.
Any ideas? I also tried core-version 4.28.1, 4.27.0 but this doesn't helped.
5 Replies
kapa.ai
kapa.ai13mo ago
Hi @faulratte. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. However, based on the information provided, it seems like there might be an issue with the TypeScript configuration or the package dependencies in your project. One possible solution could be to try reinstalling your node_modules. Here are the steps you can follow: 1. Remove node_modules folder 2. Remove package-lock.json file 3. Run npm install
rm -rf node_modules
rm package-lock.json
npm install
rm -rf node_modules
rm package-lock.json
npm install
If the issue persists, you might want to check your tsconfig.json file and ensure it's configured correctly. Also, ensure that all your refine packages are up-to-date. You can update them using the refine CLI update command:
npm run refine update
npm run refine update
If none of these solutions work, I would recommend reaching out to the refine community or checking the refine documentation (https://refine.dev/docs) for more information. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai13mo ago
<@266947612723118082> kapa.ai is still learning and improving, please let us how it did by reacting below
fascinating-indigo
fascinating-indigo13mo ago
I already tried both of your suggestions, but it did not help. @kapa.ai
kapa.ai
kapa.ai13mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- I'm sorry to hear that the issue persists. Unfortunately, based on the information provided in the extracts, I don't have enough information to provide a more specific solution to your problem. It seems like the issue is related to TypeScript not being able to find the module 'src/interfaces'. This could be due to a variety of reasons such as incorrect path, missing dependencies, or TypeScript configuration issues. I would recommend checking the following: - Ensure that the path 'src/interfaces' exists in your project and it is correctly referenced in your code. - Check your tsconfig.json file and ensure that the baseUrl and paths are correctly set. - Try installing the latest versions of react and react-dom as suggested in the refine documentation (https://refine.dev/docs/api-reference/antd/migration-guide/v4-to-v5):
npm install react@latest react-dom@latest
npm install react@latest react-dom@latest
If the issue still persists, I would recommend reaching out to the refine community or checking the refine documentation (https://refine.dev/docs) for more information. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai13mo ago
<@266947612723118082> kapa.ai is still learning and improving, please let us how it did by reacting below