optimistic-gold
optimistic-gold11mo ago

Module not found: Can't resolve 'antd/es/ConfigProvider'

I'm new to refine, I was going to test it out but upon creating a fresh project using npm create refine-app@latest I encountered this error whenever I try running yarn dev
No description
8 Replies
kapa.ai
kapa.ai11mo ago
Hi @edmer_xyz. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- I'm sorry to hear that you're encountering an error. However, without the specific details of the error message, it's difficult to provide a precise solution. Generally, after creating a new project using the refine CLI, you should be able to start the development server using the yarn dev command as shown in the documentation (https://refine.dev/docs/tutorial/getting-started/headless/create-project) and blog (https://refine.dev/blog/react-admin-panel) extracts.
yarn run dev
yarn run dev
If you're encountering an error, it could be due to a variety of reasons such as package installation issues, conflicts in your development environment, or issues with the project setup. I would recommend checking the following: 1. Ensure that all the necessary packages have been installed correctly. You can try reinstalling the packages using yarn install. 2. Check your Node.js and yarn versions. Refine might require specific versions to run correctly. 3. If you've made any modifications to the project, ensure that they are not causing the issue. If the error persists, it would be helpful if you could provide the specific error message or any additional details about the issue. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai11mo ago
<@743822007992451132> kapa.ai is still learning and improving, please let us how it did by reacting below
optimistic-gold
optimistic-gold11mo ago
@kapa.ai The error is
- error ./node_modules/@ant-design/pro-layout/es/ProLayout.js:12:0
Module not found: Can't resolve 'antd/es/ConfigProvider'
- error ./node_modules/@ant-design/pro-layout/es/ProLayout.js:12:0
Module not found: Can't resolve 'antd/es/ConfigProvider'
kapa.ai
kapa.ai11mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- This error indicates that the antd/es/ConfigProvider module cannot be found. This could be due to a problem with your node_modules directory or an issue with the package installation. Here are a couple of solutions you can try: Solution 1: 1. Remove the node_modules folder. 2. Remove the package-lock.json file. 3. Run npm install to reinstall your packages.
rm -rf node_modules
rm package-lock.json
npm install
rm -rf node_modules
rm package-lock.json
npm install
Solution 2: Update your react and react-dom to the latest version.
npm install react@latest react-dom@latest
npm install react@latest react-dom@latest
These solutions are based on the documentation (https://refine.dev/docs/api-reference/antd/migration-guide/v4-to-v5) extract provided. If the error persists, it might be a good idea to create a new issue in the refine GitHub repository or reach out to the refine community for further assistance. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai11mo ago
<@743822007992451132> kapa.ai is still learning and improving, please let us how it did by reacting below
optimistic-gold
optimistic-gold11mo ago
https://github.com/ant-design/ant-design/issues/43362 For anyone who might encounter this: The problem seems to be a compatibility issue with nextjs 13 and antd
GitHub
Module not found: Can't resolve 'antd/es/ConfigProvider' · Issue #4...
Reproduction link https://github.com/Staefloded/antd-bug Steps to reproduce Wrap <Component /> with ConfigProvider What is expected? No error should be shown What is actually happening? Modul...
national-gold
national-gold11mo ago
I am getting this same issue! Did going down a version help?
optimistic-gold
optimistic-gold11mo ago
yep