@refinedev/antd error
Hello, we've recently ran
npm i
to install packages in our dev env but we are getting the following error:
5 Replies
Hi @bombillazo. 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. The error message you're seeing seems to be related to a destructuring issue with 'SubMenu' of 'he.Menu' in the '@refinedev/antd' package. However, the information extracts provided do not contain specific details about this error.
That being said, some users have reported similar compile errors after upgrading from
@refinedev/antd@3.x.x
to @refinedev/antd@4.x.x
and have provided some solutions. You could try the following steps:
Solution 1
1. Remove node_modules
folder
2. Remove package-lock.json
file
3. Run npm install
Solution 2
Run the following command to install the latest versions of react and react-dom:
You can find more details about these solutions in the Refine documentation (https://refine.dev/docs/ui-integrations/ant-design/migration-guide/#compile-errors).
If the error persists, it might be due to an issue with the cache system of your package manager. In that case, try clearing the cache and reinstalling the dependencies. You can also try installing the latest version of the '@refinedev/antd' module by running npm i @refinedev/antd@latest
.
If none of these solutions work, I would recommend reaching out to the Refine community on Discord (https://discord.com/channels/837692625737613362/1167394144650547200) for further assistance.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@260960777010151436> kapa.ai is still learning and improving, please let us know how it did by reacting below
continuing-cyan•14mo ago
Hello @bombillazo please check for typos in your project, it should be like this:
const { Submenu } = Menu
national-goldOP•14mo ago
Hey, it was an issue wiht next transpiling certain dependencies
continuing-cyan•14mo ago
Happy to hear that it's resolved.