Failed to deploy after connecting to MongoDB

Hi so I am officially lost, my render seems to maybe time-out after successfully connecting to MongoDB. I don’t have any logs that indicate what caused the failure, but I will try to fix this deprecation warning that’s popping up.

Does anyone have any idea what might be going on? Thanks in advance for the help

Hi there

The first warning indicate that you’re using npm for your install and not yarn. Its not a good idea to mix those two. Either go npm or yarn.

You’re calling yarn install (yarn) but there is a package-lock file in your repo. So either do npm ci to use the package-lock or remove it so yarn can use its lock file.

The second error is simply a deprication warning. It doesn’t have any real effect just letting you know of changes ahead. As the text suggest you can either suppress the warning by using true flag or prepare for the change by using false.

See here: node.js - how to fix Mongoose Deprecation Warning "the strictQuery" - Stack Overflow

Hi there,

As with most “failed deploy” posts you’ll see on this forum this is likely an issue with the host and port settings. I don’t see this being related to your Mongo connection at this time.

I’ll assume you’re using Express, you’ll need to ensure that it’s trying to listen on host 0.0.0.0 and port 10000 (which is default and available in the PORT env var)

Alan

Hi, just to update, my issue has been resolved. My start command was set to node app.js, when my specific project needed node index.js. Thanks for the help!