Fresh new website using trellis/bedrock/sage 9.0.9.
On local all ok, I provisioned the staging, and then I tried to deploy, but with no success.
I have this annoying bug
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: [142.93.41.40]: FAILED! => {"changed": true, "cmd": ["composer", "install", "--no-ansi", "--no-dev", "--no-interaction", "--no-progress", "--optimize-autoloader", "--no-scripts", "--classmap-authoritative"], "delta": "0:00:00.337329", "end": "2021-02-06 00:53:26.459614", "rc": 2, "start": "2021-02-06 00:53:26.122285", "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 spent one day to try to figure out what it is going on and how to fix this, but no luck. (i saw similar post with the same problem, but they didn’t help me)
my impression is that I need to be sure that my vagrant box run composer 1.6, because it seems a problem with composer 2.
i tried with this worpdress-core-installer fails to install with Composer 2.0 · Issue #1245 · roots/trellis · GitHub
I updated the main.yml with
composer_keep_updated: false
composer_version: '1.6.0'
and I updated server.yml and dev.yml to:
{ role: composer, tags: [composer], composer_version: '1.6.0', composer_keep_updated: false }
I push changes to repo and make a provision, but I still have the problem.
I SSH into the vagrant box. From the /trellis directory, I run vagrant ssh
, I checked what version of composer is installed with composer --version
but I still have “Composer version 2.0.9 2021-01-27 16:09:27” (same thing on my staging enviroment)
what can I do?
I am really struggling with this, could somebody point me in the right direction?