Not able to compile .less Magento 2.4.6-p2

156 views Asked by At

I have a local Magento Cloud 2.4.6-p2 + Docker, local site runs perfect without errors, Im trying to customize the Magento Luma Theme, i created my own custom theme parent from Luma, grunt installed and working.

In order to compile my customizations I use grunt:

grunt clean

Execution Time (2023-09-28 18:14:48 UTC-0) loading tasks 187ms ▇▇▇▇▇▇▇▇▇▇▇▇ 8% clean:var 801ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 36% clean:pub 698ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 31% clean:generation 324ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 14% clean:blank 24ms ▇▇ 1% clean:soscode2cap 120ms ▇▇▇▇▇▇▇▇ 5% clean:backend 43ms ▇▇▇ 2% Total 2.3s (No problems found)

grunt exec

Execution Time (2023-09-28 18:16:18 UTC-0) exec:blank 2.5s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 10% exec:luma 2.2s ▇▇▇▇▇▇▇▇▇▇▇▇▇ 9% exec:soscode2cap 2.3s ▇▇▇▇▇▇▇▇▇▇▇▇▇ 9% exec:backend 5.7s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 23% exec:all 12.3s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 49% Total 25.2s (No problems found)

grunt less

root@deploy:/app# grunt less Running "less:blank" (less) task >> pub/static/frontend/Magento/blank/en_US/css/source/_reset.less: [L7:C4] Error evaluating function unit: the first argument to unit must be a number. Have you forgotten parenthesis? Warning: Error compiling pub/static/frontend/Magento/blank/en_US/css/styles-m.less Use --force to continue.

Aborted due to warnings.

Here is the problem, I try to check for _reset.less file under: pub/static/frontend/Magento/blank/en_US/css/source/_reset.less *i can see the file in Visual Studio Code, but when i try to opened i get this message: Unable to open '_reset.less' file not found. Options: Cancel / Create File.

If i select Create i get this message: Unable to create file '/Users/alex/Documents/GARDEA/magento-cloud-gardea/pub/static/frontend/Magento/blank/en_US/css/source/_reset.less' that already exists when overwrite flag is not set.

I already try, deploying, also rm -rf var/cache/* var/page_cache/* var/di/* var/generation/* var/view_preprocessed/* pub/static/adminhtml/* pub/static/frontend/* pub/static/_requirejs/* generated/code/*

UPDATE: Fix, it was a mistake I made during installation.

0

There are 0 answers