Skip to content

Compilation from source: LESS file is empty: adminhtml/Magento/spectrum/es_MX/css/styles-old.less

I am upgrading a local site to 2.4.5. When I run a static content, deploy command:

php bin/magento setup:static-content:deploy -f es_MX en_US

It throws me this error:

Compilation from source:
/var/www/vendor/magento/theme-adminhtml-backend/web/css/styles-old.less
Compilation from source: LESS file is empty:
adminhtml/Magento/spectrum/es_MX/css/styles-old.less

Compilation from source:
/var/www/vendor/magento/theme-adminhtml-backend/web/css/styles.less Compilation from source: LESS file is empty:
adminhtml/Magento/spectrum/es_MX/css/styles.less

Compilation from source
/var/www/vendor/magento/theme-adminhtml-backend/web/js/theme.js failed MagentoFrameworkViewAssetFileNotFoundException: Unable to
resolve the source file for
‘adminhtml/Magento/spectrum/es_MX/js/theme.js’ in
/var/www/vendor/magento/framework/View/Asset/File.php:161

The files mentioned exist on vendor and are not empty:

enter image description here

enter image description here

What could be causing it?