Vidly db is not created cant fetch data, cant migrate mongo-db

ERROR: getaddrinfo EAI_AGAIN db
vidly-api-1 | npm ERR! code ELIFECYCLE
vidly-api-1 | npm ERR! errno 1
vidly-api-1 | npm ERR! vidly-backend@1.0.0 db:up: migrate-mongo up
vidly-api-1 | npm ERR! Exit status 1
vidly-api-1 | npm ERR!
vidly-api-1 | npm ERR! Failed at the vidly-backend@1.0.0 db:up script.
vidly-api-1 | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
vidly-api-1 |
vidly-api-1 | npm ERR! A complete log of this run can be found in:
vidly-api-1 | npm ERR! /home/app/.npm/_logs/2022-03-30T20_18_57_129Z-debug.log
vidly-api-1 | Starting the server…
vidly-api-1 |
vidly-api-1 | > vidly-backend@1.0.0 start /app
vidly-api-1 | > nodemon --ignore ‘./tests’ index.js
vidly-api-1 |
vidly-api-1 | [nodemon] 2.0.7
vidly-api-1 | [nodemon] to restart at any time, enter rs
vidly-api-1 | [nodemon] watching path(s): .
vidly-api-1 | [nodemon] watching extensions: js,mjs,json
vidly-api-1 | [nodemon] starting node index.js
vidly-api-1 | Server started on port 3001…
vidly-api-1 | (node:91) UnhandledPromiseRejectionWarning: MongooseError: Operation movies.find() buffering timed out after 10000ms
vidly-api-1 | at Timeout. (/app/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:185:20)
vidly-api-1 | at listOnTimeout (internal/timers.js:554:17)
vidly-api-1 | at processTimers (internal/timers.js:497:7)
vidly-api-1 | (Use node --trace-warnings ... to show where the warning was created)
vidly-api-1 | (node:91) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async funct
ion without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use th
e CLI flag --unhandled-rejections=strict (see Command-line API | Node.js v17.8.0 Documentation). (rejection id: 1)
vidly-api-1 | (node:91) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handle
d will terminate the Node.js process with a non-zero exit code.

The unhandledRejection event is emitted whenever a promise rejection is not handled. “Rejection” is the canonical term for a promise reporting an error. As defined in ES6, a promise is a state machine representation of an asynchronous operation and can be in one of 3 states: “pending”, “fulfilled”, or “rejected”. Somebody decided that JavaScript programmers couldn’t be trusted with managing promise rejections properly and changed the HTML spec to require browsers to throw “unhandled promise rejection” errors if a rejected promise has no rejection handlers added before code returns to the event loop. The error usually happens in async await functions, and there’s an easy fix.

const functionName = async (arguments) => {
  try {
  // Your code here
  } catch (error) {
  // Handle rejection here