-
Notifications
You must be signed in to change notification settings - Fork 158
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 cannot find module '@react-three/cannon' #419
Comments
This could be caused by Jest by default only supports cjs. I'm not sure about vitest. If that's the case, Jest does have experimental support for esm that could help: https://jestjs.io/docs/ecmascript-modules It's worth noting though that |
Thanks for the background, very helpful! Note that we're not hoping to test |
Hi @tedsecretsource, |
Although I'm not perfectly sure if this is more of a jest issue than a cannon one, I'd like to try to start here. When writing a unit test covering cases in a file that imports cannon, all tests fail due to not being able to find the module '@react-three/cannon'. What's strange about this, is, that this is the only module jest is having problems with. For instance, fiber and postprocessing are working perfectly fine. Maybe there is a way to resolve this issue. Please see the screenshot for reference and thank you in advance!
The text was updated successfully, but these errors were encountered: