# Heroku deployment with mongodb atlas failed

**URL:** <https://forum.codewithmosh.com/t/heroku-deployment-with-mongodb-atlas-failed/1626>\
**Category:** Node\
**Created:** [January 3, 2021, 1:07am UTC](https://forum.codewithmosh.com/t/heroku-deployment-with-mongodb-atlas-failed/1626 "2021-01-03T01:07:08Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![sampreeth](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/sampreeth/32/523_2.png) [@sampreeth](https://forum.codewithmosh.com/u/sampreeth)\
**Post date:** [January 6, 2021, 12:30am UTC](https://forum.codewithmosh.com/t/heroku-deployment-with-mongodb-atlas-failed/1626/4 "2021-01-06T00:30:50Z")

</div>

> [@Heroku mongodb deployment error React course](https://forum.codewithmosh.com/t/heroku-mongodb-deployment-error-react-course/297/11):
>
> Steps I followed to fix this issue. First, npm update mongoose Latest mongoose as of 5/01/2021 is mongoose 5.11.10. If there is a newer version please check the documentation. Second, If you are following mosh course. Open db.js in startup folder. Change mongoose.connect(db) to mongoose.connect(db, {useNewUrlParser:true, useUnifiedTopology: true}) Three, copy the connection string for Node driver version 2.2.12 or later. make sure the connection string does not have (mongodb+srv) co…

---

_[View the full topic](https://forum.codewithmosh.com/t/heroku-deployment-with-mongodb-atlas-failed/1626)._
