1

I'm getting thiis error, when I try to install civicrm on Drupal 8 and 9

The following packages have new compilation tasks:

  • civicrm/composer-compile-lib has 1 task
  • civicrm/civicrm-core has 1 task

Allow these packages to compile? ([y]es, [a]lways, [n]o, [l]ist, [h]elp) y Compiling additional files (For full details, use verbose "-v" mode.) Compile: Generate CCL wrapper functions Compile: Greenwich CSS (dist/bootstrap3.css)

@php -r 'require_once '''/home/bvivaccinate/public_html/vendor/autoload.php'''; Civi\CompilePlugin\TaskTransfer::import(); \CCL::copy('''../../bower_components/select2/select2-bootstrap.css''', '''extern/select2/select2-bootstrap.scss''');' @php -r 'require_once '''/home/bvivaccinate/public_html/vendor/autoload.php'''; Civi\CompilePlugin\TaskTransfer::import(); \CCL\Tasks::scss($GLOBALS["COMPOSER_COMPILE_TASK"]);' Script @php -r 'require_once '''/home/bvivaccinate/public_html/vendor/autoload.php'''; Civi\CompilePlugin\TaskTransfer::import(); \CCL\Tasks::scss($GLOBALS["COMPOSER_COMPILE_TASK"]);' handling the shell-runner event returned with error code 255 Subcommand @composer compile returned with error code 255

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

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

These are the commands I ran to install it for drupal 9

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'

Composer version 2.0.13 PHP 7.3.28

Can someone please assist

1 Answer 1

1

In the meantime until this is fixed you can install this patch: https://patch-diff.githubusercontent.com/raw/civicrm/composer-compile-lib/pull/1.patch

Then run composer compile.

May also need to then run composer civicrm:publish.

5
  • Newbie question, but how would you apply the patch? May 16, 2021 at 15:15
  • If you have git and curl on the server, you can do cd /path/to/vendor/civicrm/composer-compile-lib && curl -L -O https://patch-diff.githubusercontent.com/raw/civicrm/composer-compile-lib/pull/1.patch && git apply 1.patch.
    – Demerit
    May 16, 2021 at 15:26
  • But the meat of it is just change line 17 in vendor/civicrm/composer-compile-lib/ src/ScssCompiler.php to public function findImport($url, $currentDir = NULL) { and line 45 to return parent::findImport($url, $currentDir); github.com/civicrm/composer-compile-lib/pull/1/…
    – Demerit
    May 16, 2021 at 15:29
  • Looks like the fix was just merged so you could just try again without patching.
    – Demerit
    May 17, 2021 at 23:09
  • Thanks for your help, it was greatly appreciated May 19, 2021 at 0:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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