This is an issue I am struggeling for a while, once you reference an ObjectId within a document in MongoDB and later serialise it as JSON, it will throw an error
Error: Error serializing `.kurs` returned from `getServerSideProps` in "/course".
Reason: `object` ("[object Uint8Array]") cannot be serialized as JSON. Please only return JSON serializable data types.
This is due to that ObjectId is not autoconvertible to string, is there any fix for that or a good approach?