'Heroku push for node Js app stuck at Mongodb connection

Just curious if anybody has come across this error. Might be silly. Seems when I am trying to deploy a Node JS express API with a MongoDB atlas connection it hangs at a successful connection and then has a timeout error.

remote:        MongoDB Connected: somecluster-shard-00-00.#####.mongodb.net
remote: -----> Timed out running buildpack Node.js
remote: Terminated
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to somerepo-bb.
remote:

I added the 0.0.0.0\0 to Mongo Atlas.

 "scripts": {
    "server": "nodemon server.js",
    "dev": "nodemon server.js",
    "start": "node server.js"
  },

No build script in the package.json either.

Appreciate any tips as the structure and setup appear to be correct. All environmental variables were added to the configs for Heroku. My alternative solution is to just rebuild and deploy before adding the connection.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source