Generate objectId locally/offline

I am currently working on an application that needs to run both online and offline, and I am experiencing the following problem: Every time I generate a new object to be saved to parse, I need to save a copy of it locally so that I can use it.
How do I get Parse to accept me sending the local generated ID? There isany other similar solution to this problem that I can’t see?
I am using mongoose to generate the IDs

You cannot generate the ids locally and send to Parse. In order to work offline, you might want to take a look at the JS SDK Local Datastore.