skip to Main Content

When I toggle Client Side Less Compilation and save it on a Magento 2.2.2 site, it throws the following error:

500 internal server error

This is the log:

[Fri Jul 27 13:13:36.324051 2018] [:error] [pid 20125] [client 5.255.250.135:46655] PHP Fatal error:  Uncaught TypeError: Argument 4 passed to Magento\Developer\Model\View\Asset\PreProcessor\FrontendCompilation::processContent() must be an instance of Magento\Framework\View\Asset\File\FallbackContext, instance of Magento\Framework\View\Asset\File\Context given, called in /var/www/html/vendor/magento/module-developer/Model/View/Asset/PreProcessor/FrontendCompilation.php on line 90 and defined in /var/www/html/vendor/magento/module-developer/Model/View/Asset/PreProcessor/FrontendCompilation.php:107nStack trace:n#0 /var/www/html/vendor/magento/module-developer/Model/View/Asset/PreProcessor/FrontendCompilation.php(90): Magento\Developer\Model\View\Asset\PreProcessor\FrontendCompilation->processContent('15859f29777d5d9...', '@import 'third-...', '', Object(Magento\Framework\View\Asset\File\Context))n#1 /var/www/html/vendor/magento/module-developer/Model/View/Asset/PreProcessor/PreprocessorStrategy.php(74): Magento\Developer\Model\View\Asset\PreProcessor\FrontendCompilation->process(Object(Magento\Framework\View\As in /var/www/html/vendor/magento/module-developer/Model/View/Asset/PreProcessor/FrontendCompilation.php on line 107

I only have access to SSH and SFTP, how can I try to fix this?
I appreciate any answer.

2

Answers


  1. run php bin/magento setup:di:compile command from your magento root directory.

    Login or Signup to reply.
  2. Find the path dev/front_end_development_workflow/type and if the value is client_side_compilation then change it to server_side_compilation. Clear all caches again and run rm -rf var/cache/*

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search