Install command results in error
Closed this issue · 10 comments
Running the composer create-project
command from https://github.com/joachim-n/drupal-core-development-project#installation results in the following error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires drupal/core-recommended * -> satisfiable by drupal/core-recommended[11.x-dev].
- drupal/core-recommended 11.x-dev requires drupal/core 10.2.x-dev -> found drupal/core[11.x-dev] but it does not match the constraint.
I had previously installed this project with no issues and was in the process of re-installing after removing the previous installation.
Possibly related: https://www.drupal.org/project/drupal/issues/3364646
If you switch the core repo to 10.2.x, can you then do composer install
?
This is what I got:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires drupal/core 10.2.x, found drupal/core[11.x-dev] but it does not match the constraint.
Problem 2
- Root composer.json requires drupal/drupal * -> satisfiable by drupal/drupal[11.x-dev].
- drupal/drupal 11.x-dev requires drupal/core 11.x-dev -> found drupal/core[11.x-dev] but it conflicts with your root composer.json require (10.2.x).
Problem 3
- Root composer.json requires drupal/core-recommended * -> satisfiable by drupal/core-recommended[11.x-dev].
- drupal/core-recommended 11.x-dev requires drupal/core 10.2.x-dev -> found drupal/core[11.x-dev] but it does not match the constraint.
Hmmm. I think we need to set up branch aliases in Composer somehow. Can you try changing the root composer to say:
"drupal/core": "11.x as 10.2.x-dev",
I was able to work around it for the meantime by just removing "drupal/core-recommended": "*"
from the root composer.json file.
I tested out your suggestion and it appears to work.
I’m not entirely certain that 11.x-dev as 10.2.x-dev
is necessary. I didn’t get any error in the installation procedure. Unless there is some other error message I have yet to see.
Running the following command worked fine and installed 11.x-dev without error messages.
ddev composer create-project joachim-n/drupal-core-development-project
This issue mentions a Drupal core issue that has since been fixed so maybe this issue is already resolved, and the README can be updated?
If, on the other hand, 11.x-dev as 10.2.x-dev
is still required, then I suggest updating the README to use composer
commands instead of manually editing composer.json which leaves you with a composer.lock file with wrong hash.
composer require drupal/core:"11.x-dev as 10.2.x-dev"
I tried ddev composer create-project joachim-n/drupal-core-development-project
and I got:
'ddev composer create-project' is unsupported. Please use 'ddev composer create'
for basic project creation or 'ddev ssh' into the web container and execute
'composer create-project' directly.
My apologies. That was an incorrect copy paste. This is the command:
ddev composer create joachim-n/drupal-core-development-project
I followed the installation steps from README here:
https://github.com/joachim-n/drupal-core-development-project#installation-on-ddev
That's working for me too.
That's great news that it works now!!! Thanks for reporting!
I'll update the README.
Going to close this, as I confirmed it works. I've removed the bits about this from the README.
Thank you for investigating @jameswilson!