node-mongodb-s3-backup icon indicating copy to clipboard operation
node-mongodb-s3-backup copied to clipboard

TypeError: mime.lookup is not a function error

Open simonecogno opened this issue 8 years ago • 2 comments

I get this error after running mongodb_s3_backup -n config.sample.json. Do you know what can cause this?

/usr/lib/node_modules/mongodb_s3_backup/index.js:262
        throw(err);
        ^

TypeError: mime.lookup is not a function
    at /usr/lib/node_modules/mongodb_s3_backup/node_modules/knox/lib/client.js:386:28
    at FSReqWrap.oncomplete (fs.js:82:15)

simonecogno avatar Sep 21 '17 09:09 simonecogno

I've encounter this issue too, seems the problem is from knox, which is the s3 library used by this library.

Quick fix is replacing the package.json and redirect to the temporary fix link:

ref: https://github.com/Automattic/knox/issues/326

bbqaaq avatar Oct 25 '17 11:10 bbqaaq

I've forked this repo to fix this issue, remove a deprecated warning, fix logging and add support for: replica sets, SSL, and authenticationDatabase options. Feel free to use it if you like: https://github.com/dkoo761/node-mongodb-s3-backup.

NOTE: My fork is not published to NPM so you'll need to download and install it (which is easy and I've added instructions in the README).

dkoo761 avatar Jul 15 '20 06:07 dkoo761