0

Once I enabled client-side less compilation, the entire page breaks. getting 404 errors for less files. I'm on developer mode. tried clearing var/cache, var/view_preprocessed, var/page_cache, pub/static folders, and deployed static content, but gets a similar error as of 404. I couldn't switch back to the server-side compilation mode again as the "save config" button doesn't work anymore.

enter image description here enter image description here

D:\xampp7.2\htdocs\mytheme>php bin/magento deploy:mode:show
Current application mode: developer. (Note: Environment variables may override this value.)

D:\xampp7.2\htdocs\mytheme>php bin/magento setup:static-content:deploy -f

Deploy using quick strategy
frontend/Magento/blank/en_US            682/2365            ========>------------------- 28%    6 secs
Compilation from source D:/xampp7.2/htdocs/mytheme/lib/web/mage/gallery/gallery.less failed
Magento\Framework\Exception\FileSystemException: A symlink for "D:/xampp7.2/htdocs/mytheme/lib/web/mage/gallery/module/_variables.less" can't be created and placed to "D:/xampp7.2/htdocs/mytheme/pub/static/frontend/Magento/blank/en_US/mage/gallery/module/_variables.less". Warning!symlink(): Cannot create symlink, error code(1314) in D:\xampp7.2\htdocs\mytheme\vendor\magento\framework\Filesystem\Driver\File.php:359
Stack trace:
#0 D:\xampp7.2\htdocs\mytheme\vendor\magento\framework\Filesystem\Directory\Write.php(166): Magento\Framework\Filesystem\Driver\File->symlink('D:/xampp7.2/htd...', 'D:/xampp7.2/htd...', Object(Magento\Framework\Filesystem\Driver\File))
#1 D:\xampp7.2\htdocs\mytheme\vendor\magento\framework\App\View\Asset\MaterializationStrategy\Symlink.php(30): Magento\Framework\Filesystem\Directory\Write->createSymlink('_variables.less', 'frontend/Magent...', Object(Magento\Framework\Filesystem\Directory\Write))
#2 D:\xampp7.2\htdocs\mytheme\vendor\magento\framework\App\View\Asset\Publisher.php(79): Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink->publishFile(Object(Magento\Framework\Filesystem\Directory\Write), Object(Magento\Framework\Filesystem\Directory\Write), '_variables.less', 'frontend/Magent...')
#3 D:\xampp7.2\htdocs\mytheme\vendor\magento\framework\App\View\Asset\Publisher.php(62): Magento\Framework\App\View\Asset\Publisher->publishAsset(Object(Magento\Framework\View\Asset\File))
#4 D:\xampp7.2\htdocs\mytheme\vendor\magento\module-developer\Model\Css\PreProcessor\FileGenerator\PublicationDecorator.php(76): Magento\Framework\App\View\Asset\Publisher->publish(Object(Magento\Framework\View\Asset\File))
#5 D:\xampp7.2\htdocs\mytheme\vendor\magento\framework\Css\PreProcessor\FileGenerator\RelatedGenerator.php(55): Magento\Developer\Model\Css\PreProcessor\FileGenerator\PublicationDecorator->generateRelatedFile('module/_variabl...', Object(Magento\Framework\View\Asset\File))
#6 D:\xampp7.2\htdocs\mytheme\vendor\magento\framework\Css\PreProcessor\Instruction\Import.php(71): Magento\Framework\Css\PreProcessor\FileGenerator\RelatedGenerator->generate(Object(Magento\Framework\Css\PreProcessor\Instruction\Import))
#7 D:\xampp7.2\htdocs\mytheme\vendor\magento\framework\View\Asset\PreProcessor\Pool.php(77): Magento\Framework\Css\PreProcessor\Instruction\Import->process(Object(Magento\Framework\View\Asset\PreProcessor\Chain))
#8 D:\xampp7.2\htdocs\mytheme\vendor\magento\framework\View\Asset\Source.php(152): Magento\Framework\View\Asset\PreProcessor\Pool->process(Object(Magento\Framework\View\Asset\PreProcessor\Chain))
#9 D:\xampp7.2\htdocs\mytheme\vendor\magento\framework\View\Asset\Source.php(121): Magento\Framework\View\Asset\Source->preProcess(Object(Magento\Framework\View\Asset\File))
#10 D:\xampp7.2\htdocs\mytheme\vendor\magento\module-developer\Model\View\Asset\PreProcessor\FrontendCompilation.php(119): Magento\Framework\View\Asset\Source->getContent(Object(Magento\Framework\View\Asset\File))
#11 D:\xampp7.2\htdocs\mytheme\vendor\magento\module-developer\Model\View\Asset\PreProcessor\FrontendCompilation.php(90): Magento\Developer\Model\View\Asset\PreProcessor\FrontendCompilation->processContent('mage/gallery/ga...', '', '', Object(Magento\Framework\View\Asset\File\FallbackContext))
#12 D:\xampp7.2\htdocs\mytheme\vendor\magento\module-developer\Model\View\Asset\PreProcessor\PreprocessorStrategy.php(74): Magento\Developer\Model\View\Asset\PreProcessor\FrontendCompilation->process(Object(Magento\Framework\View\Asset\PreProcessor\Chain))

1 Answer 1

1

If you want to change back to "server side compilation mode" use this commant followed by php if needed - bin/magento config:set dev/front_end_development_workflow/type server_side_compilation

or in phpmyadmin search fot core_config table and in that search for "dev/front_end_development_workflow/type" and change its value to "server_side_compilation"

For more info: https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/css-preprocess.html

Thanks

2
  • Worked like charm, thanks Nilesh. But do you know what happened here with enabling client-side less compilation? how can I enable it successfully Aug 6, 2020 at 4:53
  • I don't have much idea but I have wire one link as For more info Aug 6, 2020 at 7:45

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.