0

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?

  • did you try setup upgrade command? – Ashish Raj Oct 18 '18 at 8:56
  • yes I try it. It doesn't work !! – Dimitrios Gournias Oct 18 '18 at 9:08
  • try after delete files from generated folder. – kunj Oct 18 '18 at 9:55
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

  • 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 – Dimitrios Gournias Oct 18 '18 at 11:40
  • clean the content of generated/ then restart the steps – PЯINCƏ Oct 18 '18 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. – Dimitrios Gournias Oct 19 '18 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 '18 at 7:58
  • 1
    It 's seems so difficult to develop in magneto I do one change and crash for ever.. – Dimitrios Gournias Oct 19 '18 at 9:27
0

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

  • 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 at 17:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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