Troubleshooting Buildpack Errors
Last updated December 03, 2024
Table of Contents
Missing File Failure
If the configured buildpack can’t handle your application, you get an error. For example, Heroku’s Ruby buildpack expects a Gemfile
to be present in the root folder of an application to correctly identify its type. If the buildpack of an application is set to heroku/ruby
and no Gemfile
is present, the application fails to build.
This situation can also occur if you remove or rename a file that previously allowed us to detect your application type.
For example, if you pushed an application written in PHP, which contained a composer.json
and a package.json
with NPM packages for asset handling, the application is detected as a Node.js application.
Cedar-Generation Apps
The removal of package.json
doesn’t automatically reconfigure the buildpack used for Cedar-generation apps. The classic buildpack is pinned to heroku/nodejs
, and trying git push
without a package.json
results in an error.
For classic buildpacks, you must manually clear the buildpack or set the desired buildpack for the app to resolve this error. In this example, to heroku/php
.
Fir-Generation Apps
For Cloud Native Buildpacks, manage the buildpacks in your project.toml
file. No automatic pinning occurs for these apps.