Open 3omar3allam opened 5 years ago
I get this error whenever I run this on NodeJS
TypeError: MongoBackup is not a constructor
My code:
const MongoBackup = require('mongodb-atlas-backup'); var backup = new MongoBackup({ user: <USER>, password: <PASSWORD>, replicaSet: <REPLICA SET> }); backup.dump();
Try:
const MongoBackup = require('mongodb-atlas-backup').default;
The suggested solution worked. Issue can be closed now.
I get this error whenever I run this on NodeJS
My code: