1
db connection error querySrv ENOTFOUND _mongodb._tcp.nodeapi.vlvom.mongodb.net
(node:7720) UnhandledPromiseRejectionWarning: Error: querySrv ENOTFOUND _mongodb._tcp.nodeapi.vlvom.mongodb.net
    at QueryReqWrap.onresolve [as oncomplete] (dns.js:203:19)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:7720) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function 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 the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:7720) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
GET / 200 66.595 ms - 58

Why I got above error in node.js? Can anyone help me?

1
  • It looks like you're running into an ENOTFOUND error, indicating that Mongoose can't find the database you're trying to connect to. Verify that your connection string is correct. Also, it would help if you included the code in your question where you connect to the database so we can see what's causing the error. Commented Apr 29, 2021 at 3:49

1 Answer 1

1

I resolve my problem. The solution to my error is I used node.js oldest version and then I used the latest version to solve this.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.