Skip to content
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

Jest test suite failed to run. Cannot use import statement outside a module #96

Open
Anav11 opened this issue Jul 28, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@Anav11
Copy link

Anav11 commented Jul 28, 2024

Hi! I get an error when running my jest tests.
btw transformIgnorePatterns didn't help

/node_modules/react-hook-form-antd/dist/index.js:34
    import { Form as AntdForm } from "antd";
    ^^^^^^

    SyntaxError: Cannot use import statement outside a module

@jsun969 jsun969 added the bug Something isn't working label Jul 28, 2024
@jsun969
Copy link
Owner

jsun969 commented Jul 28, 2024

Since it's working in my test, could you provide the version you are using and a minimal reproduction?

@Anav11
Copy link
Author

Anav11 commented Jul 29, 2024

https://stackblitz.com/edit/vitejs-vite-yq5e2f?terminal=dev

@jsun969
Copy link
Owner

jsun969 commented Jul 30, 2024

Much appreciate! I'll take a look ASAP.

@akshays-repo
Copy link

i am facing the same issue any solution for this @jsun969 @Anav11

@jsun969
Copy link
Owner

jsun969 commented Sep 11, 2024

Sry for the late reply. That's kinda weird, is it working in your webpage? Could you provide the version you're using and try to downgrade it to see if it works?

@Anav11
Copy link
Author

Anav11 commented Sep 15, 2024

Could you please take another look at the link I provided? It allows you to downgrade the library version. The issue still reproduces even after downgrading.

@jsun969
Copy link
Owner

jsun969 commented Sep 15, 2024

@Anav11 Yea thx. I'll try to address it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants