By elenaRay
Hello! I tried to deploy a Laravel project in Digitalocean App Platform but it fails with following error:
I see in github project of bcmath_compat (https://github.com/phpseclib/bcmath_compat) that in Heroku environment they suggest to execute command:
composer require phpseclib/bcmath_compat:1.0.4
I insert it in build command of Digitalocean App Platform but problem persist. Any suggestion? Thanks!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
The composer command you reference modifies the composer.json
file in your repo. Download composer locally, run the command, and commit the updated composer.json
file. Our build process tries to prepare the environment in advance of the build_command
. This process includes loading composer dependencies, so it’s likely the error is happening before the build_command is executed.
With regard to composer2: The rollout of composer2 caused some problems with existing applications and was rolled back. We’re currently working on a strategy to rollout the update with impacting existing apps.
D’oh! I’m an idiot, I didn’t think to launch comand locally. Thanks cbaker!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.