Question

Build commands stopped working

My build commands suddenly stopped working on digitalocean laravel app. Here is the error log. Anyone know whats wrong?

0.21.2 watchdog-3.0.0 wcwidth-0.2.6 webcolors-1.12 webencodings-0.5.1 websocket-client-1.4.2 widgetsnbextension-4.0.5 yarl-1.9.2 zipp-3.16.2
[2023-09-26 21:55:06] │ -----> Downloading NLTK corpora…
[2023-09-26 21:55:06] │  !     'nltk.txt' not found, not downloading any corpora
[2023-09-26 21:55:06] │  !     Learn more: https://devcenter.heroku.com/articles/python-nltk
[2023-09-26 21:55:14] │ Running custom build command: composer update
[2023-09-26 21:55:14] │ composer require laravel/ui
[2023-09-26 21:55:14] │ composer dump-autoload
[2023-09-26 21:55:14] │ bash: composer: command not found
[2023-09-26 21:55:14] │ bash: line 1: composer: command not found
[2023-09-26 21:55:14] │ bash: line 2: composer: command not found
[2023-09-26 21:55:14] │ building: exit status 127
[2023-09-26 21:55:14] │ ERROR: failed to build: exit status 1
[2023-09-26 21:55:15] │ 
[2023-09-26 21:55:15] │ 
[2023-09-26 21:55:15] │ For documentation on the buildpacks used to build your app, please see:
[2023-09-26 21:55:15] │ 
[2023-09-26 21:55:15] │    Node.js  v0.3.6    https://do.co/apps-buildpack-node
[2023-09-26 21:55:15] │    Python   v2.234.4  https://do.co/apps-buildpack-python
[2023-09-26 21:55:15] │ 
[2023-09-26 21:55:15] │  ✘ build failed
[]

Submit an answer


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!

Sign In or Sign Up to Answer

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.

alexdo
Site Moderator
Site Moderator badge
September 27, 2023

Heya,

Have you made any changes to the repository itself, e.g. moving files to different directories, etc.? As per Bobby’s reply, The App Platform looks for composer.json or index.php to detect a PHP application.

Additionally, if you’ve restricted access to the repository you might experience a similar issue.

Hope that this helps!

Hi there,

It looks like that the App Platform is only detecting Node.js and Python in your project.

The App Platform looks for any of the following to detect a PHP application:

  • composer.json
  • index.php

If you don’t have one of those in the build directory that you’ve specified, the PHP buildpack will not be included:

https://docs.digitalocean.com/products/app-platform/reference/buildpacks/php/

Can you confirm if this is the case?

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel