In my file, i download and upzip a .zip folder which contains a JSON file. I have also checked that the file does exist after download from the following code,
RNFetchBlob.fs.exists($dbSchema)
.then((exists) => {
console.log(
Exists: ${exists})
})
.catch((e) => { console.log(e) })
which returns true. However, when i do
const realmSchema = require($dbSchema);
,
I get the following typescript error:
Error: TransformError config/database/database.ts: config/database/database.ts:Invalid call at line 52: require($dbSchema)
.
Does anyone know what might cause this?