Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MongoBackup is not a constructor #3

Open
3omar3allam opened this issue Feb 10, 2019 · 2 comments
Open

MongoBackup is not a constructor #3

3omar3allam opened this issue Feb 10, 2019 · 2 comments

Comments

@3omar3allam
Copy link

3omar3allam commented Feb 10, 2019

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();
@PTaylour
Copy link

Try:

const MongoBackup = require('mongodb-atlas-backup').default;

@ankurvr
Copy link

ankurvr commented Jun 25, 2020

The suggested solution worked. Issue can be closed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants