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

Cannot read property 'initializeJSI' of undefined" on stack #1886

Open
Bnsahana31 opened this issue Feb 10, 2025 · 0 comments
Open

Cannot read property 'initializeJSI' of undefined" on stack #1886

Bnsahana31 opened this issue Feb 10, 2025 · 0 comments

Comments

@Bnsahana31
Copy link

Description
A plain React Native app with WatermelonDB for web (using LokiJS) and Android (SQLite)

Steps to Reproduce

  1. Clone repository https://github.com/Bnsahana31/web_watermelondb.git
  2. npm install

Or to manually reproduce in a new project

  1. Install and configure WatermelonDB with LokiJS for Web and SQLite for Android.
  2. Run the app on Web only → Works fine.
  3. Run the app on Android only → Works fine.
  4. Run both Android and Web together → Android throws an error.

Expected Behaviour

  • WatermelonDB should work correctly on Web (with LokiJS) and Android (with Native SQLite) without conflicts.

Actual Behaviour

  • Web (LokiJS) works fine.
  • Android (SQLite) throws the error:

Cannot read property 'initializeJSI' of undefined

  • WatermelonDB works fine when tested only with Android or only Web.
  • The issue only happens when running both Android and Web together.
  • Additionally, faced fs and path module issues, which were resolved separately.

Image

System Details

React Native Version: 0.77.0
WatermelonDB Version: 0.27.1
Platform: Android (Web is working fine)
Database Setup:
Web: LokiJS
Android: Native SQLite
React Native Environment: Plain React Native (not Expo)

Error Logs

TypeError: Cannot read property 'initializeJS' of undefined
at [file/path]
at ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant