migrate-mongo icon indicating copy to clipboard operation
migrate-mongo copied to clipboard

ERROR: command find requires authentication

Open Tagman opened this issue 3 years ago • 2 comments

I setup a mongo db via docker. Using the basic example from docker-hub. Using the mongo-express web interface I can correctly see the initial databases 'admin', 'config', etc.

But when I try to simply check the migrations with npx migrate-mongo status my terminal just return the error in the title ERROR: command find requires authentication

I couldnt find a way to add my mongo credentials. I set them up via the docker-compose file. Is it trying to use any credentials saved locally somewhere?

Tagman avatar Dec 12 '20 17:12 Tagman

Using the url property inside migrate-mongo-config.js like this makes it work. Is their any way to configure the password without writing it in plain-text inside the config?

Tagman avatar Dec 12 '20 17:12 Tagman

Hi Tagman, are you able to run migrations inside docker? I am getting the following error even if the migrate-mongo is installed globally inside docker. const utf8Encoder = new TextEncoder(); api | ^ api | api | ReferenceError: TextEncoder is not defined api | at Object. (/usr/local/lib/node_modules/migrate-mongo/node_modules/whatwg-url/lib/encoding.js:2:21) api | at Module._compile (internal/modules/cjs/loader.js:778:30) api | at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) api | at Module.load (internal/modules/cjs/loader.js:653:32) api | at tryModuleLoad (internal/modules/cjs/loader.js:593:12) api | at Function.Module._load (internal/modules/cjs/loader.js:585:3) api | at Module.require (internal/modules/cjs/loader.js:692:17) api | at require (internal/modules/cjs/helpers.js:25:18) api | at Object. (/usr/local/lib/node_modules/migrate-mongo/node_modules/whatwg-url/lib/url-state-machine.js:5:34)

sushanth-shetty avatar Jan 07 '22 03:01 sushanth-shetty

Closing this. Issue is not caused by migrate-mongo IMHO.

seppevs avatar Sep 27 '23 07:09 seppevs