I want to learn nodeJS and have started a course accordingly and this course is already a few years old. In the course nodemon is used and it shows me the following error "TypeError: _clientP.then is not a function" that is present in the file -> /node_modules/connect-mongo/build/main/lib/MongoStore.js:128.
Here is an excerpt from the MongoStore.js file:
this.collectionP = _clientP.then(async (con) => {
const collection = con
.db(options.dbName)
.collection(options.collectionName);
await this.setAutoRemove(collection);
return collection;
Translated with DeepL.com (free version)
Description is above.