drupal-vm icon indicating copy to clipboard operation
drupal-vm copied to clipboard

Provisioning fails with composer error

Open purplepixie opened this issue 10 years ago • 8 comments

Trying to install drupal-vm on a Ubuntu 16 box, I get the following error:

TASK [Install dependencies with composer require.] *****************************
failed: [drupalvm] (item=drupal/devel:8.*) => {"changed": true, "cmd": ["/usr/bin/composer", "require", "drupal/devel:8.*"], "delta": "0:00:11.742029", "end": "2016-10-05 13:39:07.407023", "failed": true, "item": "drupal/devel:8.*", "rc": 2, "start": "2016-10-05 13:38:55.664994", "stderr": "    1/4:\thttp://packagist.org/p/provider-latest$08582e902c944bb0e0a8605ec3d32715bd49830ca2e8b94d9d9bc3982c6d2f91.json\n    2/4:\thttp://packagist.org/p/provider-2016-04$e239135891cd41c95966e3e650c5af3f5deeefc9c5b045715325f1a2fac4ed54.json\n    3/4:\thttp://packagist.org/p/provider-2016-07$f934685a390f754c4e8ffcccf57eb6a637d94526357e2d43a1cfab4cec7aab62.json\n    4/4:\thttp://packagist.org/p/provider-2015$14c3be6a3567d9d840e18938a21fdfccbfae87393715b2a19aa7b355832644d1.json\n    Finished: success: 4, skipped: 0, failure: 0, total: 4\n./composer.json has been updated\n    1/4:\thttp://packagist.org/p/provider-latest$08582e902c944bb0e0a8605ec3d32715bd49830ca2e8b94d9d9bc3982c6d2f91.json\n    2/4:\thttp://packagist.org/p/provider-2016-04$e239135891cd41c95966e3e650c5af3f5deeefc9c5b045715325f1a2fac4ed54.json\n    3/4:\thttp://packagist.org/p/provider-2016-07$f934685a390f754c4e8ffcccf57eb6a637d94526357e2d43a1cfab4cec7aab62.json\n    4/4:\thttp://packagist.org/p/provider-2015$14c3be6a3567d9d840e18938a21fdfccbfae87393715b2a19aa7b355832644d1.json\n    Finished: success: 4, skipped: 0, failure: 0, total: 4\n> DrupalProject\\composer\\ScriptHandler::checkComposerVersion\nLoading composer repositories with package information\nUpdating dependencies (including require-dev)\nYour requirements could not be resolved to an installable set of packages.\n\n  Problem 1\n    - The requested package drupal/devel 8.* exists as drupal/devel[dev-1.x, 1.x-dev, 1.0.0-alpha1] but these are rejected by your constraint.\n\n\nInstallation failed, reverting ./composer.json to its original content.", "stdout": "", "stdout_lines": [], "warnings": []}

I can ssh into the box and when I cd to /var/www/drupalvm/drupal and manually run composer install and/or composer require I get no errors at all.

purplepixie avatar Oct 05 '16 13:10 purplepixie

@purplepixie - Are you using the included example.drupal.composer.json? If so, it defines devel like so, using the Drupal.org composer packagist: "drupal/devel": "1.0.x-dev".

If using build_composer_project, then it looks like the drupal-project just released a change that switches to the official Drupal.org composer packagist too (https://github.com/drupal-composer/drupal-project/pull/204). I'm going to test a fix for that.

geerlingguy avatar Oct 05 '16 14:10 geerlingguy

The fix I'm testing is updating this variable in config.yml:

drupal_composer_dependencies:
  - "drupal/devel:1.x-dev"

geerlingguy avatar Oct 05 '16 14:10 geerlingguy

Hi - I haven't changed anything at all - just renamed default.config.yml to config.yml so everything is default. If you tell me what to change I'll happily also test updated variable fix.

purplepixie avatar Oct 05 '16 14:10 purplepixie

@purplepixie please try the change in the comment just above (I'm testing that now).

geerlingguy avatar Oct 05 '16 14:10 geerlingguy

Changing it to the following fixed it for me.

drupal_composer_dependencies:
  - "drupal/devel:1.x-dev"

bsc-briannicholas avatar Oct 05 '16 14:10 bsc-briannicholas

Yep, that's it! I was still off in my comment a few above :)

geerlingguy avatar Oct 05 '16 14:10 geerlingguy

Changing to 1.x-dev works a charm. Thanks so much @geerlingguy for this great package and also @bsc-briannicholas for your clarification

purplepixie avatar Oct 05 '16 14:10 purplepixie

Fixed via above commit (for drupal-project and plain drupal.composer.json install), and just tagged 3.3.1 with the fix.

geerlingguy avatar Oct 05 '16 14:10 geerlingguy