Fixed FlattenMaps type added by default with .toJSON() in mongoose (the error is showing up in session.controller.ts line 20).
I first got that error when working on a new project inspired from your tutorial. and it's also showing up when deleting the yarn.lock and rebuilding it with yarn install.
Argument of type 'AnyObject | FlattenMaps' is not assignable to parameter of type 'string'.
Type 'AnyObject' is not assignable to type 'string'.ts(2345)
Fixed FlattenMaps type added by default with .toJSON() in mongoose (the error is showing up in session.controller.ts line 20).
I first got that error when working on a new project inspired from your tutorial. and it's also showing up when deleting the yarn.lock and rebuilding it with yarn install.