3

Does 'react-native-sqlite-storage' work with expo or it is compulsory to use expo-sqlite. I am trying to create an app which heavily depends on a database but for some reason 'react-native-sqlite-storage' shows me two error,

ERROR TypeError: Cannot convert null value to object, js engine: hermes

and

ERROR Invariant Violation: "main" has not been registered. This can happen if:

  • Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
  • A module failed to load due to an error and AppRegistry.registerComponent wasn't called., js engine: hermes

Furthermore, there seems to be very little information regarding this error online and that's when I found out about expo-sqlite.

1 Answer 1

6

You can use expo-sqlite (https://docs.expo.dev/versions/latest/sdk/sqlite/)

Using react-native-sqlite-storage seems to be not an good idea:

  1. You won’t be able to use react-native-sqlite-storage as it contains native code
  2. The project seems to be no longer maintained

Technically you can use the module by building your own expo client or eject the app but you should not do that if it isn‘t really necessary.

Sign up to request clarification or add additional context in comments.

1 Comment

thanks for the help. I have started using expo-sqlite but for some reason I am not able to open my database. I get an error which says Property 'db' doesn't exist, js engine: hermes. For this I have posted another question so could you please look into it as well, stackoverflow.com/q/76689691/19423789

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.