Errors while updating the website from nextjs 13 to 14
Unanswered
Chukar posted this in #help-forum
ChukarOP
I try to update my website from nextjs 13 to 14 but got the below error
node_modules@ant-design\icons\es\icons\LoadingOutlined.js:1
import _extends from "@babel/runtime/helpers/esm/extends";
^^^^^^
SyntaxError: Cannot use import statement outside a module
Is there anything I have to change in config files?
node_modules@ant-design\icons\es\icons\LoadingOutlined.js:1
import _extends from "@babel/runtime/helpers/esm/extends";
^^^^^^
SyntaxError: Cannot use import statement outside a module
Is there anything I have to change in config files?
6 Replies
Can you try to remove node_module and reinstall?
@Chukar
ChukarOP
yes
in nextjs 13, it is working fine. But in 14, it gives me this error. Is there any issue with "antd" package?
do you have the latest version of ant?
here are some possible workarounds that could work for you
https://github.com/ant-design/pro-components/issues/4852
https://github.com/ant-design/pro-components/issues/6525
here are some possible workarounds that could work for you
https://github.com/ant-design/pro-components/issues/4852
https://github.com/ant-design/pro-components/issues/6525
ChukarOP
Thanks. I fixed this bug by importing the assets directly from antd/lib.