1

Hello I am new in developing in Magento, I have Magento CE. When I set the Front End development workflow to type client side less compilation shows me an error

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 C:\xampp\htdocs\magento\vendor\magento\module-developer\Model\View\Asset\PreProcessor\FrontendCompilation.php on line 90 and defined in C:\xampp\htdocs\magento\vendor\magento\module-developer\Model\View\Asset\PreProcessor\FrontendCompilation.php:107 Stack trace: #0 C:\xampp\htdocs\magento\vendor\magento\module-developer\Model\View\Asset\PreProcessor\FrontendCompilation.php(90): Magento\Developer\Model\View\Asset\PreProcessor\FrontendCompilation->processContent('e6a662994948b56...', '@import 'source...', '', Object(Magento\Framework\View\Asset\File\Context)) #1 C:\xampp\htdocs\magento\vendor\magento\module-developer\Model\View\Asset\PreProcessor\PreprocessorStrategy.php(74): Magento\Developer\Model\View\Asset\PreProcessor\FrontendCompilation-> in C:\xampp\htdocs\magento\vendor\magento\module-developer\Model\View\Asset\PreProcessor\FrontendCompilation.php on line 107

My mode is set it to developer mode. Any consideration for that?

3
  • did you try setup upgrade command?
    – Ashish Raj
    Oct 18, 2018 at 8:56
  • yes I try it. It doesn't work !! Oct 18, 2018 at 9:08
  • try after delete files from generated folder.
    – kunj
    Oct 18, 2018 at 9:55

2 Answers 2

5

Just check if you have "CSS Settings" -> "Merge CSS Files" set to No, and then try switching to Client side

Use this command to set css minification to NO

php bin/magento config:set dev/css/merge_css_files 0

Thanks for this @s-adamson answer it saved many times.

2
  • 3
    If developer mode is crashing, then you can't reach these settings using the front end (the section is hidden in production mode) so you'll need to use the command line: php bin/magento config:set dev/css/merge_css_files 0
    – S Adamson
    Aug 20, 2019 at 17:51
  • @SAdamson Thanks it saved Nov 6, 2019 at 15:04
0

Remove the content of : var/view_preprocessed/

Remove the content of : pub/static/

run : php bin/magento cache:clean

run : php bin/magento setup:di:compile

run : php bin/magento setup:static-content:deploy -f

5
  • when I try php bin/magento setup:di:compile it shows The directory "C:/xampp/htdocs/magento/generated/code/Temando/Shipping/Model" cannot be deleted Warning!rmdir(C:/xampp/htdocs/magento/generated/code/Temando/Shipping/Model): Directory not empty Oct 18, 2018 at 11:40
  • clean the content of generated/ then restart the steps
    – PЯINCƎ
    Oct 18, 2018 at 13:12
  • Well, it works but I loose the front end and I see only a blank page. After that I try the setup:upgrade and it shows me again the same problem.. How I can restart magento ? It was a fresh install. Oct 19, 2018 at 5:47
  • I don't know if there is some way to retart Magento, you need to remove your custom modules, theme. otherwise you reinstall a new Magento
    – PЯINCƎ
    Oct 19, 2018 at 7:58
  • 1
    It 's seems so difficult to develop in magneto I do one change and crash for ever.. Oct 19, 2018 at 9:27

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.