New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught SyntaxError: Cannot use import statement outside a module #21094
Comments
Hello @wangytangy. Please provide a online reproduction by forking this link https://u.ant.design/codesandbox-repro or a minimal GitHub repository. Issues labeled by 你好 @wangytangy, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 此处 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。7 天内未跟进的 issue 将会被自动关闭。 |
This issue is closed because it has been marked as |
I have the same problem as above. Similar issue to #13620 For CRA + Ant Design, I thought that component testing work out of the box. |
@wangytangy This is a solution that worked for me. |
@arvinsim are you able to post any snippet here since the link that you shared is 404'ing and possibly external links may not be counted on in terms of availability in future. |
@arvinsim could you post your solution again? I can't see the link you posted. |
How to solve this for cases not using babel? using ts-jest. |
Reproduction link
https://spectrum.chat/next-js/general/the-problem-in-integrating-next-js-with-ant-ui-when-customizing-ant-themes~bdc65d8d-ad92-4ec0-8469-f31269b85bc6
Steps to reproduce
What is expected?
The button should render correctly.
What is actually happening?
The webpage cannot load because of a Javascript syntax error: "Uncaught SyntaxError: Cannot use import statement outside a module"
The webpack bundle shows the error here:
/***/ (function(module, exports) {
/***/ }),
The text was updated successfully, but these errors were encountered: