[BUG] nextjs 14 upgrade breaks imports
Closed this issue · 4 comments
Describe the bug
When upgrading next 13 to 14 there is an issue with imports exports.
error:
TypeError: Cannot read properties of undefined (reading 'Footer')
at eval (webpack-internal:///./node_modules/@refinedev/antd/node_modules/@ant-design/pro-layout/lib/components/Footer.js:14:27)
Steps To Reproduce
create next app
install @refinedev/antd
yarn install
yarn dev
Expected behavior
Should run the app with on expected errors in the console
Packages
- @refinedev/antd
Additional Context
No response
Hey @annschultequindar,
Just tried with create-next-app
and used App Router to initialize my app. Installed @refinedev/core
and @refinedev/antd
and initialized <Refine />
with a proper page using @refindev/antd
components. Had no such error.
Then I re-created an app using Pages router and did the same configuration. No issues with it as well.
Can you try upgrading your @refinedev/antd
and antd
versions? It might be related with an outdated version 🤔
Closing this due to inactivity, please feel free to re-open when you can provide more info about the issue @annschultequindar
I encountered this issue in a test environment where next.config.mjs
contained transpilePackages: ["@refinedev/antd"]
. After removing it from the transpilePackages
array, the issue resolved.
Thank you! I think this is the issue I am facing has to do with @ant-design/icons
not compiling but I also had the transpilePackages: ["@refinedev/antd"]
in my next.config so that solved part of the problem. Thank you!