Answers.Body: <p>OK. Looks like I am not the only one with this issue.</p>
  <p>A newer version of scssphp (v.1.7) appears to be the culprit: <a href="https://lab.civicrm.org/dev/drupal/-/issues/164#note_65206" rel="nofollow noreferrer">https://lab.civicrm.org/dev/drupal/-/issues/164#note_65206</a></p>
  <p>Patch applied to CiviCRM 5.42</p>
  <p><a href="https://github.com/civicrm/civicrm-core/tree/5.42" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/tree/5.42</a></p>
  <p>The <strong>tl;dr</strong> on lab.civicrm.org: If you're affected by this and need an immediate fix, run <code>composer require' 'scssphp/scssphp:1.6'</code></p>
  <p>I ended up removing 5.41 then tried again requiring civicrm 5.42. Installed and compiled without issue.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-17T07:28:00.627Z
Answers.Text: Yeh this was only an issue recently because of the scssphp upgrade got released. Patch has been merged into the 5.41 and 5.42 branches so if you wanted to use 5.41 with this patch you would have to specify the civicrm-core version to be 5.41-dev rather than 5.41.1
Answers.UserDisplayName: Seamus Lee
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-22T08:31:54.077Z
Answers.Text: Presumably everyone trying to install currently is going to be affected by this? Effectively stopping them from installing unless they happen to stumble on this post? I don't see this issue mentioned in the install docs.
Answers.UserDisplayName: Graham
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-23T16:19:00.673Z
Answers.Text: 5.41 is sorted out now but for 5.40 and earlier yes. The bigger problem now is how to prevent a similar thing in the future. Composer promises flexibility, but it also creates a situation where you can install the exact same versions of drupal+civi at 09:00, and then do it again at 09:30, on the same computer same environment, and end up with different installs. Upgrades are even more fun. You can do it on a staging site and then just pass around a .lock file so everyone has the same thing, but then you can get conflicts if someone has module X installed that conflicts.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-17T04:25:04.853Z
Answers.LastActivityDate: 2021-09-23T09:35:34.097Z
Answers.LastEditDate: 2021-09-23T09:35:34.097Z
Answers.UserDisplayName: PaulC
Body: <p>I've installed Drupal 9.2.5 using Composer (version 2.1.8). I am trying to install CiviCRM 5.41.0. I followed the steps in the CiviCRM instructions for installation on Drupal 8/9 using Composer.</p>
  <p>The first couple of goes I got an &quot;Installation failed&quot; message at the CiviCRM compilation step.</p>
  <blockquote>
  <p>Installation failed, reverting ./composer.json and ./composer.lock to their original content.</p>
  <p>[RuntimeException]
  Subcommand @composer compile  returned with error code 255</p>
  </blockquote>
  <p>So I decided to install Civi again, but skipped the compile step and do that as a separate instance.</p>
  <p>The installation completed.</p>
  <p>I then ran composer to compile all and got the same error code 255. For the full trace, see below.</p>
  <p>I previously installed CiviCRM 5.40.3 and Drupal 9.2.3 with no issue.</p>
  <p>I have read the similar issue over here:<a href="https://civicrm.stackexchange.com/questions/39565/drupal-8-9-compilation-install-error">Drupal 8/9 Compilation Install Error</a> but I noted that a patch for that issue was applied four months ago.</p>
  <p>Can someone please help. I am not a developer. Just a self-taught admin trying to install CiviCRM.</p>
  <p>Thanks.</p>
  <blockquote>
  <p>$ composer compile --all</p>
  <p>Compiling additional files (For full details, use verbose &quot;-v&quot; mode.)
  Compile: Generate CCL wrapper functions
  Compile: Greenwich CSS (dist/bootstrap3.css)</p>
  <p>@php -r 'require_once '''/home/sdarmnet/dev9-my.sdarm.org.au/vendor/autoload.php'''; Civi\CompilePlugin\TaskTransfer::import(); \CCL::copy('''../../bower_components/select2/select2-bootstrap.css''', '''extern/select2/select2-bootstrap.scss''');'</p>
  <p>@php -r 'require_once '''/home/sdarmnet/dev9-my.sdarm.org.au/vendor/autoload.php'''; Civi\CompilePlugin\TaskTransfer::import(); \CCL\Tasks::scss($GLOBALS[\Civi\CompilePlugin\TaskTransfer::GLOBAL_VAR]);'</p>
  <p>Script @php -r 'require_once '''/home/sdarmnet/dev9-my.sdarm.org.au/vendor/autoload.php'''; Civi\CompilePlugin\TaskTransfer::import(); \CCL\Tasks::scss($GLOBALS[\Civi\CompilePlugin\TaskTransfer::GLOBAL_VAR]);' handling the shell-runner event returned with error code 255
  [sdarmnet@s04ad dev9-my.sdarm.org.au]$ composer --version
  Composer version 2.1.8 2021-09-15 13:55:14```</p>
  </blockquote>
  
Tags: <drupal><installation><composer><drupal-9>
Title: Drupal 9 - CiviCRM Compilation Error
ThreadText: # Drupal 9 - CiviCRM Compilation Error
  
  (Asked by: username_0 on 2021-09-17)
  
  I've installed Drupal 9.2.5 using Composer (version 2.1.8). I am trying to install CiviCRM 5.41.0. I followed the steps in the CiviCRM instructions for installation on Drupal 8/9 using Composer.
  
  The first couple of goes I got an "Installation failed" message at the CiviCRM compilation step.
  
  > Installation failed, reverting ./composer.json and ./composer.lock to their original content.
  >
  > [RuntimeException]
  > Subcommand @composer compile returned with error code 255
  
  So I decided to install Civi again, but skipped the compile step and do that as a separate instance.
  
  The installation completed.
  
  I then ran composer to compile all and got the same error code 255. For the full trace, see below.
  
  I previously installed CiviCRM 5.40.3 and Drupal 9.2.3 with no issue.
  
  I have read the similar issue over here:[Drupal 8/9 Compilation Install Error](https://civicrm.stackexchange.com/questions/39565/drupal-8-9-compilation-install-error) but I noted that a patch for that issue was applied four months ago.
  
  Can someone please help. I am not a developer. Just a self-taught admin trying to install CiviCRM.
  
  Thanks.
  
  > $ composer compile --all
  >
  > 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/sdarmnet/dev9-my.sdarm.org.au/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/sdarmnet/dev9-my.sdarm.org.au/vendor/autoload.php'''; Civi\CompilePlugin\TaskTransfer::import(); \CCL\Tasks::scss($GLOBALS[\Civi\CompilePlugin\TaskTransfer::GLOBAL\_VAR]);'
  >
  > Script @php -r 'require\_once '''/home/sdarmnet/dev9-my.sdarm.org.au/vendor/autoload.php'''; Civi\CompilePlugin\TaskTransfer::import(); \CCL\Tasks::scss($GLOBALS[\Civi\CompilePlugin\TaskTransfer::GLOBAL\_VAR]);' handling the shell-runner event returned with error code 255
  > [sdarmnet@s04ad dev9-my.sdarm.org.au]$ composer --version
  > Composer version 2.1.8 2021-09-15 13:55:14```
  
  **Tags:** drupal, installation, composer, drupal-9
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2021-09-17. Score: 3 | Accepted answer
  
  OK. Looks like I am not the only one with this issue.
  
  A newer version of scssphp (v.1.7) appears to be the culprit: <https://lab.civicrm.org/dev/drupal/-/issues/164#note_65206>
  
  Patch applied to CiviCRM 5.42
  
  <https://github.com/civicrm/civicrm-core/tree/5.42>
  
  The **tl;dr** on lab.civicrm.org: If you're affected by this and need an immediate fix, run `composer require' 'scssphp/scssphp:1.6'`
  
  I ended up removing 5.41 then tried again requiring civicrm 5.42. Installed and compiled without issue.
  
  > **Comments:**
  > **username_1**: Yeh this was only an issue recently because of the scssphp upgrade got released. Patch has been merged into the 5.41 and 5.42 branches so if you wanted to use 5.41 with this patch you would have to specify the civicrm-core version to be 5.41-dev rather than 5.41.1  
  > **username_2**: Presumably everyone trying to install currently is going to be affected by this? Effectively stopping them from installing unless they happen to stumble on this post? I don't see this issue mentioned in the install docs.  
  > **username_3**: 5.41 is sorted out now but for 5.40 and earlier yes. The bigger problem now is how to prevent a similar thing in the future. Composer promises flexibility, but it also creates a situation where you can install the exact same versions of drupal+civi at 09:00, and then do it again at 09:30, on the same computer same environment, and end up with different installs. Upgrades are even more fun. You can do it on a staging site and then just pass around a .lock file so everyone has the same thing, but then you can get conflicts if someone has module X installed that conflicts.  
  
  ---
  
  