3

This has been asked before, but I'm still not finding a solution. When using client side compile I get "NameError: variable @font-family-name__base is undefined". I've deleted everything and reinstalled M2 with composer. I'm working off of the blank theme with no custom code whatsoever. Permissions should be correct, I've deployed static content, grunt deploy, cleared caches numerous times and yet I keep getting "NameError: variable @font-family-name__base is undefined". I feel like M2 is very finicky, so I'm sure others have been in this same situation.

What are the cases and/or solutions that you guys have found?

Also, Luma works without any issues? This makes absolutely no sense to me...

2
  • Please specify your environment and Magento version. Besides cache and pub/static you removed var/view_preprocessed too?
    – nuovecode
    Mar 12 '17 at 23:07
  • I cleared var/view_preprocessed as well. Magento 2.0.7, Ubuntu 1.04 LTS with vagrant on a mac running Serra 10.12.3. Mar 13 '17 at 1:16
3

Long story short, missing less file. The missing file was custom and didn't contain any styling, but the missing file prevented less from compiling.

1
  • Facing the same issue, Can you tell me clearly about the missing file
    – fernandus
    Feb 23 '19 at 7:56
1

For those having this issue, it's usually caused by either missing less files or more commonly by creating less files with similar names to your parent theme's less files like _variables or _extends which will overwrite those files with yours which most likely doesn't have the same code. Check your parent theme and make sure you're not overwriting a less file of the same name. You either will have to copy that file into your theme and put in your modifications or rename your less file to something more unique.

I tend to make my own less files to store more common code like font-families and colors then add those into the styles-l and styles-m less files which I copied from my parent theme which is usually Magento Blank. I ran into this issue when I unknowingly created a less file in my "css/source" folder with the same name as one in my parent theme.

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.