Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • D Drupal
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 54
    • Issues 54
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Development
  • Drupal
  • Issues
  • #164
Closed
Open
Created Sep 16, 2021 by JonGold@JonGoldDeveloper

D8: composer-compile-plugin fails to compile Greenwich SCSS w/ scssphp 1.7.0

I ran into an error running composer upgrade/install this morning (see below). SCSS isn't in my wheelhouse, but I saw that it wasn't happening on sites with older versions of scssphp. Anything below 1.7 seems to work.

I could submit a PR changing the Composer requirements here, but I suspect the deeper issue is a SCSS problem that needs a SCSS person to fix.

tl;dr If you're affected by this and need an immediate fix, run composer require 'scssphp/scssphp:1.6'.

Compile: Greenwich CSS (dist/bootstrap3.css)
> @php -r 'require_once '\''/home/jon/local/example/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/jon/local/example/vendor/autoload.php'\''; Civi\CompilePlugin\TaskTransfer::import(); \CCL\Tasks::scss($GLOBALS[\Civi\CompilePlugin\TaskTransfer::GLOBAL_VAR]);'
PHP Fatal error:  Uncaught ScssPhp\ScssPhp\Exception\SassScriptException: $amount: Expected 5% to be within 0% and 1% in /home/jon/local/example/vendor/scssphp/scssphp/src/Exception/SassScriptException.php:30
Stack trace:
#0 /home/jon/local/example/vendor/scssphp/scssphp/src/Node/Number.php(265): ScssPhp\ScssPhp\Exception\SassScriptException::forArgument('Expected 5% to ...', 'amount')
#1 /home/jon/local/example/vendor/scssphp/scssphp/src/Compiler.php(8450): ScssPhp\ScssPhp\Node\Number->valueInRange(0, 1, 'amount')
#2 /home/jon/local/example/vendor/scssphp/scssphp/src/Compiler.php(8459): ScssPhp\ScssPhp\Compiler->libOpacify(Array)
#3 /home/jon/local/example/vendor/scssphp/scssphp/src/Compiler.php(6193): ScssPhp\ScssPhp\Compiler->libFadeIn(Array, Array)
#4 /home/jon/local/example/vendor/scssphp/scssphp/src/Compiler.php(3662): ScssPhp\ScssPhp\Compiler->callNativeFunction('fadein', Array, NULL, Array)
#5 /home/jon/local/example/vendor/scssphp/scssphp/src/Compiler.php(3588): ScssPhp\ScssPhp\Compiler->fncall(Array, Array)
#6 /home/jon/local/example/vendor/scssphp in /home/jon/local/example/vendor/scssphp/scssphp/src/Compiler.php on line 553
Script @php -r 'require_once '\''/home/jon/local/example/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
Subcommand @composer compile  returned with error code 255

                                                              
  [RuntimeException]                                          
  Subcommand @composer compile  returned with error code 255  
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking