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](https://cdn.answeroverflow.com/1125936469287116850/image.png)
8 Replies
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.
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:
----------------------<@743822007992451132> kapa.ai is still learning and improving, please let us how it did by reacting below
like-gold•15mo ago
@kapa.ai
The error is
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.
Solution 2:
Update your react
and react-dom
to the latest version.
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:
----------------------<@743822007992451132> kapa.ai is still learning and improving, please let us how it did by reacting below
like-gold•15mo 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...
stormy-gold•15mo ago
I am getting this same issue! Did going down a version help?
like-gold•15mo ago
yep