Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

295
Vistas
Heroku detects composer 1 when I am using composer 2

When trying to deploy in Heroku it returns the following error:

 !     The following is the full output from the installation attempt:
 !     
 !     > You are using Composer 1 which is deprecated. You should upgrade to Composer 2, see https://blog.packagist.com/deprecating-composer-1-support/
 !     > Loading repositories with available runtimes and extensions
 !     > Updating dependencies
 !     > Your requirements could not be resolved to an installable set of packages.
 !     > 
 !     >   Problem 1
 !     >     - The requested package composer-plugin-api could not be found in any version, there may be a typo in the package name.
 !     > 

There is not much information on how to fix this. How else should I specify that composer 2 is being used? Everything was installed from composer 2.

composer.json

{
    "autoload": {
        "psr-4": {
            "App\\": "app/"
        },
        "files": [
            "App/helpers.php"
        ]
    },
    "require": {
        "vlucas/phpdotenv": "^5.4",
        "abraham/twitteroauth": "^3.2",
        "jenssegers/blade": "^1.4",
        "bramus/router": "^1.6",
        "nesbot/carbon": "^2.55",
        "phpfastcache/phpfastcache": "*",
        "php": ">=8.0"
    }
}

composer --version

Composer version 2.2.1 2021-12-22 22:21:31
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

The problem was the exact composer version, heroku works with composer version 2.1.14 (https://devcenter.heroku.com/articles/php-support#installation-of-dependencies) and my composer was 2.2.1 .

I fixed it with the following:

Remove composer.lock & vendor

composer self-update 2.1.14
composer install
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda