Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

deepu07's avatar
Level 11

Trying to deploy Laravel MongoDB application in Heroku/DigitalOcean

Hi Folks,

I'm trying to deploy the Laravel MongoDB application in Heroku/DigitalOcean but both giving the same error.

 Problem 1
- composer.json/composer.lock requires ext-mongodb 1.14.0 -> found ext-mongodb[1.8.0, ..., 1.13.0] but it does not match the constraint.
Problem 2
 - Root composer.json requires mongodb/mongodb 1.13.0 -> satisfiable by mongodb/mongodb[1.13.0].
 - mongodb/mongodb 1.13.0 requires ext-mongodb ^1.14.0 -> found ext-mongodb[1.8.0, ..., 1.13.0] but it does not match the constraint.

But When I run in my local it is working without any errors. Tried all of the cmnds no luck. any help / thoughts would be great. Thanks

0 likes
3 replies
deepu07's avatar
Level 11

Thanks for the reply @frankielee Tried these commands and ran some commands from StackOverflow suggestions

composer require mongodb/mongodb --ignore-platform-reqs
composer require jenssegers/mongodb --ignore-platform-reqs

Yes, I have installed the driver and restarted the PHP server still no luck. It is working local without any problem

frankielee's avatar

@deepu07

mongodb/mongodb 1.13.0 requires ext-mongodb ^1.14.0 -> found ext-mongodb[1.8.0, ..., 1.13.0]

Please check the compatibility, as the composer is complaining that the version mismatched.

Please check the version of the driver installed and your php version

Remove the file composer.lock and try

composer update  mongodb/mongodb

Please or to participate in this conversation.