Table of Contents [expand]
Last updated September 11, 2026
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.
Classic Buildpack Apps
Removing the package.json doesn’t automatically reconfigure the buildpack on apps using classic buildpacks. 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 buildpack for the app to resolve this error. In this example, to heroku/php.
Cloud Native Buildpack (CNB) Apps
For Cloud Native Buildpacks (CNBs), manage the buildpacks in your project.toml file. No automatic pinning occurs for these apps.