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!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
The composer command you reference modifies the
composer.jsonfile in your repo. Download composer locally, run the command, and commit the updated
composer.jsonfile. 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!
Want to learn more? Join the DigitalOcean Community!
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Sign up now