OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Cannot convert null value to object, js engine: hermes

  • Thread starter Thread starter SummeGaming
  • Start date Start date
S

SummeGaming

Guest
I'm trying to add the react-native-sqlite-storage module but it does not want to open the database:

Code:
import { useContext, useEffect } from 'react';
import SQLite from 'react-native-sqlite-storage';
import { WorkoutDataContext, WorkoutDataSetterContext } from '../App';

const db = SQLite.openDatabase({name: "test.db"});


export const saveWorkout = () => {
 ...

Line 5 errors with:

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

I don't understand why. I have the module installed correctly.

<p>I'm trying to add the react-native-sqlite-storage module but it does not want to open the database:</p>
<pre><code>import { useContext, useEffect } from 'react';
import SQLite from 'react-native-sqlite-storage';
import { WorkoutDataContext, WorkoutDataSetterContext } from '../App';

const db = SQLite.openDatabase({name: "test.db"});


export const saveWorkout = () => {
...
</code></pre>
<p>Line 5 errors with:</p>
<blockquote>
<p>TypeError: Cannot convert null value to object, js engine: hermes</p>
</blockquote>
<p>I don't understand why. I have the module installed correctly.</p>
 
Top