1

I just started to create a custom theme having as parent Magento/blank no when I try to deploy static-content I get variable @addto-color is undefined. How to debug this issue.

static structure

Vendor
--Theme
---web
----css
-----source
------- _themes.less //empty no css yet
------- _extend.less //empty no css yet

theme is registered and when I run bin/magento setup:static-content:deploy fails with

Compilation from source: 
frontend/Vendor/theme/de_DE/css/styles-l.less
variable @addto-color is undefined

looking on https://github.com/magento/magento2-samples/tree/master/sample-module-theme everything looks the same as my theme but on deploy no variables getting inherited

1
  • Please share your code here
    – Arunendra
    Commented Apr 5, 2016 at 12:29

1 Answer 1

1

Ensure you are in developer mode:

php bin/magento deploy:mode:set developer

Delete all files/folders in:

pub/static/frontend
var/view_preprocessed

rm -rf pub/static/*
rm -rf var/view_preprocessed/*

then deploy your language specifically:

bin/magento setup:static-content:deploy de_DE

set file permissions of pub folder and sub-directories to 755:

find pub -type d -exec chmod 755 {} \;
7
  • already made it couple of times, I think is a symlink issue
    – fefe
    Commented Apr 5, 2016 at 16:43
  • try renaming theme source folder to _source and then delete files & re-run deploy command
    – Joshua34
    Commented Apr 5, 2016 at 16:47
  • made it couple of times
    – fefe
    Commented Apr 5, 2016 at 16:59
  • Ensure you are in developer mode: php bin/magento deploy:mode:set developer
    – Joshua34
    Commented Apr 5, 2016 at 17:02
  • Also try changing permissions of pub folder and all subdirectories to 755: find pub -type d -exec chmod 755 {} \;
    – Joshua34
    Commented Apr 5, 2016 at 17:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.