-
Notifications
You must be signed in to change notification settings - Fork 577
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: "Cannot find module 'realm'" #6562
Comments
➤ PM Bot commented: Jira ticket: RJS-2766 |
@ldoot Thank you for reporting. In v12.6.1 we migrated away from rollup, and I wonder if it has an impact on Jest. Is it possible to try v12.6.0 to give us an indication? |
@kneth thanks for you response. We are using v12.6.2 due to the export of the Unmanaged type, however I reverted back to 12.6.0 to test your assertion and it still falls over on the import, albeit this time with a TypeError rather than an 'Cannot find module' error.
Let me know if there's any more information I can provide to help with this. |
Same issue here
|
Update, not happining on 12.6.0 |
I had the same problem. Doesn't happen on 12.6.0. |
I appreciate that this issue may be fixed with a downgrade as mentioned to be working by Acetyld and villemuittari, however as we are making use of the |
same issue on 12.7.0+, rollback to 12.6.0 working 👍 |
this seems to be an issue when using expo with realm 12.7.0 |
@houssam-adesso @huneau Please create a new issue with more details. |
|
How frequently does the bug occur?
Always
Description
Scenario: Running a Jest unit test suite which imports and interacts with Realm on an expo react-native codebase.
Expected result: Successful import of and interaction with Realm during Jest test suite.
Received result: When evaluating the test file, the line for importing Realm fails.
This bug occurs on version
12.6.2
of Realm.This bug does NOT occur on version
12.3.0
Realm.In both cases, we have been using version
29.7.0
of Jest.Stacktrace & log output
Can you reproduce the bug?
Always
Reproduction Steps
Using Realm version
12.6.2
and Jest version29.7.0
:The bug is reproducible with the minimal set of Jest configuration:
And the corresponding babel configuration:
And some Jest test file that imports and uses Realm, such as:
Simply running the test will reproduce the issue. We've observed this issue on multiple people's machines.
Version
12.6.2
What services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
MacOs Ventura 13.5
Build environment
Which debugger for React Native: Hermes
Cocoapods version
No response
The text was updated successfully, but these errors were encountered: