It’s been several days since I tried to migrate the data of my application which is on Realm Cloud to MongoDb Realm by following the tutorial https://docs.realm.io/realm-legacy-migration-guide/ but I am completely blocked.
WhenI tried the method described at the end of the tutorial by creating a copyToMongoDb file, I have an error when I run it:
SyntaxError: Invalid or unexpected token at wrapSafe (internal / modules / cjs / loader.js: 931: 16) at Module._compile (internal / modules / cjs / loader.js: 979: 27) at Object.Module._extensions..js (internal / modules / cjs / loader.js: 1035: 10) at Module.load (internal / modules / cjs / loader.js: 879: 32) at Function.Module._load (internal / modules / cjs / loader.js: 724: 14) at Function.executeUserEntryPoint [as runMain] (internal / modules / run_main.js: 60: 12) at internal / main / run_main_module.js: 17: 47
I have my application developed in Swift and what I really don’t understand is that I am using the latest version of RealmSwift 10.0 to be able to insert data into MongoDb. However, with RealmSwift 10.0 you cannot connect to Realm Cloud, you have to use an old version for that. How then to get the data on Realm Cloud in order to copy it directly to MongoDb? I have tried downloading the data from Realm Cloud to a local .realm file but I cannot open it using RealmSwift 10.0, is this possible?
Thanks very much for your help, I hope my question is clear enough