Drupal 8.6.3, CiviCRM 5.7.0, PHP 7.2.10. Followed the instructions in https://github.com/civicrm/civicrm-drupal-8/blob/master/README.md (skipped "load dummy data" and -b'd "master" instead of the missing 8.x-master). The error comes up after the final instruction, "install CiviCRM Core." I now have composer.phar and seems to be ready to go, but what are the appropriate command line args & working directory given where I'm at? I'd prefer not to have to scratch everything to follow the directions here or here!
-
1Hello SRQ_civicrm, I try this mydropwizard.com/blog/… and also blog.acromedia.com/… without great succes. Except with the David Snopek project on GitLab, but unfortunately it is old versions of Drupal and CiviCRM. I couldn't upgrade both. so I tried the Installation of the CiviCRM Drupal 8 Module on github.com/civicrm/civicrm-drupal-8/blob/master/README.md and got the same warning : CiviCRM must be installed via composer.– IchiCommented Dec 25, 2018 at 11:26
3 Answers
This error comes when the civicrm folder is not present in the vendor directory.
Make sure you install civicrm with composer
• composer config extra.enable-patching true
• composer require civicrm/civicrm-asset-plugin:'~1.1'
• composer require civicrm/civicrm-{core,packages,drupal-8}:'5.31.0'
And add l10n if needed.
I asked on Friday in chat.civicrm.org and it sounded like the current state is still like those other instructions you've linked. I wasn't able to get it working with the automated vagrant setup and haven't got around yet to trying those manual instructions with the latest code, but maybe someone else can confirm sooner.
-
It does appear to still require the longer instructions at mydropwizard.com/blog/…, combined with the notes at hq.megaphonetech.com/projects/commons/wiki/… to avoid making the vendor directory web accessible.– DemeritCommented Dec 30, 2018 at 15:13
In the end I found that:
composer require civicrm/civicrm-core
seemed to work for me :)
I found it via:
:~/buildkit/build/ptest/sites/default$ composer require civicrm
No composer.json in current directory, do you want to use the one at /home/xxx/buildkit/build/test? [Y,n]? y
[InvalidArgumentException]
Could not find package civicrm.
Did you mean one of these?
civicrm/cv
civicrm/civix
drupal/civimail
drupal/civicrm_cron
civicrm/civicrm-core
and saw the civicrm/civicrm-core in the suggestions...
the site broke after it had installed - but this does seem like the right command.
-
1The latest on this is that you need to use the roundearth installer but not the longer instructions anymore. See gitlab.com/roundearth/civicrm-composer-plugin. There's some work going on to be able to use buildkit but it's not ready yet. To get a development environment I've been using it like this civicrm.stackexchange.com/questions/21895/…– DemeritCommented Jan 28, 2020 at 19:48