I'm migrating my app's backend from Parse to Apple's CloudKit. I have a file Datapoint.json
that is nearly a gigabyte (represents 2.5 million Parse objects). I'm trying to import this in my migration.js
script but I keep getting the error toString failed
.
I read up on this error and it seems that a file can't be bigger than 256mb. What should I do?
var json = JSON.parse(fs.readFileSync('./Datapoint.json', 'utf8'));