LESS issue on static content deploy. How to resolve it?

LESS issue on static content deploy. How to resolve it?

      The following error when running a bin/magento setup:static-content:deploy command implies that the child theme is not utilizing the Magento LESS to CSS compilation: 
Compilation from source: /srv/public_html/vendor/amasty/module-name/view/base/web/css/source/mkcss/ammodule.less
Unable to get content for 'frontend/Vendor/theme/en_US/../../../lib/css/source/lib/_lib.less'
      It can be resolved by following the steps below:
  1. In the terminal, open the root Magento directory.
  2. Navigate to the directory of the affected module (vendor/amasty/module-name or app/code/Amasty/ModuleName) and open the registration.php file. It will contain the module name in the needed format; please copy it for further use.
  3. From the module directory, go to the following path: view/frontend/web/css/source/mkcss/ and find a file of a similar format: ammodule.less (e.g. ambrands.less); save its name and copy its content for further use.
  4. Navigate to the directory of the theme; it can be found at app/design/vendor/theme (e.g. app/design/Smartwave/Porto).
  5. There, using the previously copied module and .less file names, create an Amasty_ModuleName/web/css/source/mkcss/ammodule.less file.
  6. After that, copy the content of the ammodule.less file from the module folder to the newly created file, and add two "steps" (../../) to the path of _lib.less and _responsive.less
      The file contents should look as follows (the underlined elements in bold are the added ones):
// Generating css file. Path from vendor/magento/theme-frontend-blank
@import (reference) '../../../../../lib::css/source/lib/_lib.less'; // Library files
@import (reference) '../../../../../lib::css/source/lib/_responsive.less'; // Global responsive
@import '../_module.less';
      After completing the steps, the deploy command should run successfully.

      • Related Articles

      • What information should I provide when submitting an issue-related ticket?

              In our support center, we are struggling to provide a solution for your request as fast as possible. Though, it might get delayed through verifying details, finding out your support license, Magento and module version and etc. There are several ...
      • How to update an Amasty extension?

              Below, you may find the instructions on installing an update to an Amasty extension. Choose the appropriate method of the extension update – via Composer or via a manual file upload. The choice of the method corresponds to the initial way the ...
      • How to install an Amasty extension?

              There are 2 two ways of installing an extension on Magento 2. It's recommended to use one and the same installation method for all Amasty extensions.  Composer installation       1. To download and install Magento modules, the vendor repository ...
      • I’m trying to install the module via composer, but the package is not found. How to resolve it?

              Composer is the dependency manager that allows you easily download the required files on your server. The files are located on a remote server, or a repository, that you need to add to the list of “known” ones and authenticate to using the ...
      • How to translate a Magento 2 extension?

              Generally, an extension consists of specific elements (i.e. interface, settings display, added content) which can be translated to another language. When making a translation, as the first step, look through the module's elements in the Admin ...
      • Announcements

      • Already Done in Q4'22

        New Amasty services Make sure your site is well-performing with our E-commerce QA testing service. Let our specialists check various elements of your website and get the issues fixed. The service is available for any e-commerce platform (Magento, Shopify,
      • Roadmap | What to expect in Q4'22

        New features and improvements Elastic Search better performance of synonyms; REST API support. Product Labels enhanced extension performance with a lot of products on the page. Blog Pro posts migration from one Magento instance to another; email notifications
      • Already done in Q3'22

        New solutions Our new SaaS tool - Website SEO Health Check. Discover the most severe SEO mistakes which can damage your website. Available as part of Pro and Premium SEO Toolkit. New features and improvements Import and Export NEW we added the possibility
      • What to expect in Q3'22

        New features and improvements Improved Layered Navigation integration with Live Search. Elastic Search improved Relevance Rules functionality. Product Feed an option to add configurable options to product URL; possibility to use Quantity attribute as
      • Already Done in Q2'22

        Brand-new extensions Google Page Speed Optimizer Powered by SpeedSize™ is a synergy of Amasty Google Page Speed Optimizer and SpeedSize, which will help you greatly increase the site performance due to code structure compression and neuroscience media