Composer 2 Update causing issues on deployment with Kinsta

i updated composer to v2.0.8 on my kinsta site and now when I deploy from trellis I’m getting this error

TASK [deploy : Install npm dependencies] ***************************************
changed: [kinsta_production]

TASK [deploy : Install Composer dependencies] **********************************
System info:
  Ansible 2.9.11; Darwin
  Trellis version (per changelog): "Add support for Lets Encrypt contact emails"
---------------------------------------------------
non-zero return code
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run
composer update.

  Problem 1
    - composer/installers is locked to version v1.6.0 and an update of this
package was not requested.
    - composer/installers v1.6.0 requires composer-plugin-api ^1.0 -> found
composer-plugin-api[2.0.0] but it does not match the constraint.
  Problem 2
    - composer/installers v1.6.0 requires composer-plugin-api ^1.0 -> found
composer-plugin-api[2.0.0] but it does not match the constraint.
    - soberwp/controller 2.1.1 requires composer/installers ^1.0 ->
satisfiable by composer/installers[v1.6.0].
    - soberwp/controller is locked to version 2.1.1 and an update of this
package was not requested.

You are using Composer 2, which some of your plugins seem to be incompatible
with. Make sure you update your plugins or report a plugin-issue to ask them
to support Composer 2.
fatal: [kinsta_production]: FAILED! => {"changed": true, "cmd": ["composer", "install", "--no-ansi", "--no-dev", "--no-interaction", "--no-progress", "--optimize-autoloader", "--no-scripts", "--classmap-authoritative"], "delta": "0:00:00.136730", "end": "2020-12-09 18:30:58.715161", "rc": 2, "start": "2020-12-09 18:30:58.578431", "stderr_lines": ["Installing dependencies from lock file", "Verifying lock file contents can be installed on current platform.", "Your lock file does not contain a compatible set of packages. Please run composer update.", "", "  Problem 1", "    - composer/installers is locked to version v1.6.0 and an update of this package was not requested.", "    - composer/installers v1.6.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.", "  Problem 2", "    - composer/installers v1.6.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.", "    - soberwp/controller 2.1.1 requires composer/installers ^1.0 -> satisfiable by composer/installers[v1.6.0].", "    - soberwp/controller is locked to version 2.1.1 and an update of this package was not requested.", "", "You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2."], "stdout": "", "stdout_lines": []}

I’m running composer 2.0.8 on my local machine and on vagrant and haven’t had any issues when running composer update or vagrant provision

I realized that I had soberwp/controller installed as a composer package in my /site/compser.json file when it was already in my sage theme composer.json file. I removed this from the /site/compser.json file and that fixed it!

This topic was automatically closed after 42 days. New replies are no longer allowed.