3

I’m trying get CiviCRM working on a Drupal 9.1.9 test site. I know CiviCRM but not Drupal… I followed this: https://docs.civicrm.org/installation/en/latest/drupal8/

These are the commands I ran to install it:

php composer.phar create-project drupal/recommended-project

php composer.phar require pear/validate_finance_creditcard:dev-master

php composer.phar config extra.enable-patching true

php composer.phar require civicrm/civicrm-asset-plugin:'~1.1'

php composer.phar require civicrm/civicrm-{core,packages,drupal-8}:'~5.37.2'

The last command does a lot of installing and then gives me:

[Exception]
Cannot prompt for compilation preferences. Please update COMPOSER_COMPILE, extra.compile-mode, or extra.compile-whitelist.

compile [--all] [-N|--dry-run] [--soft-options [SOFT-OPTIONS]] [--] []...

Subcommand @composer compile returned with error code 1

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

[RuntimeException]
Subcommand @composer compile returned with error code 1

Composer version 2.0.14 PHP 7.4.14

Can someone please assist…thanks!

1

Add this line to the top level composer.json and then run composer compile:

"compile-whitelist": ["civicrm/civicrm-core", "civicrm/composer-compile-lib"]

Then it won't try to prompt you next time for upgrades either.

1
  • Being a dummy, I didn't know where to put the line of code, but the 3rd try worked...thanks!!! I put it near the end, before: "enable-patching": "true"
    – jimcrist
    Jun 1 at 22:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.