.lib-magento-reset is undefined in /opt/magento/public_html/var/view_preprocessed/pub/static/frontend/MyCompany/MyTheme/en_US/css/source/_reset.less In File.php line 151: The contents from the "/opt/magento/public_html/pub/static/frontend/MyCompany/MyTheme/en_US/css/styles-l.css" file can't be read. Warning!file_get_contents(/opt/magento/public_html/pub/static/frontend/MyCompany/MyTheme/en_US/css/styles-l.css): failed to open stream: No such file or directory
This error, where the thing being undefined can differ is the error I run into most. I fixed it on some occasions, but the thing that does the trick seems to differ each time. This post is meant as a log to get to the bottom of what and why is happening here.
Now this errors happens whenever compilation runs, and it can’t find a css variable. Now I think this happens because the rendering of these files time-out at some point so the variable definition gets lost.
Turns out it was a naming-conflict in my custom css files. However the error was silent everywhere in the less render engine. I updated my files with a custom namestamp to solve conflicts and that seemed to work.