I have a theme that extends the Luma theme. I am trying to get Grunt working to do preprocessing. So far, I don't have any changes/additions in my theme at all. I setup my themes.js as follows:

module.exports = {
    training_test: {
        area: 'frontend',
        name: 'Training/test',
        locale: 'en_US',
        files: [
        dsl: 'less'

I do not have any root source files, but the documentation states that if you do not have any, use those from the parent theme.

When I run grunt exec:training_test I get the following error message:

Processed Area: frontend, Locale: en_US, Theme: Training/test, File type: less.
>> [InvalidArgumentException]
>>   Verify entered values of the argument and options. Unable to resolve the source file for 'frontend/Training/test/en_US/css/styles-m.less'

I setup Grunt using a build script (on Ubuntu, hence the symlink):

sudo apt-get -y install nodejs
sudo apt-get -y install npm
sudo npm install -g grunt-cli
sudo ln -s /usr/bin/nodejs /usr/bin/node
cd /var/www/html/public; npm install

I then ran the magento deploy task (not sure if this is required or not):

bin/magento dev:source-theme:deploy

I noticed that the Luma theme also does not extend the source files in question (css/styles-m, css/styles-l):

luma: {
    area: 'frontend',
    name: 'Magento/luma',
    locale: 'en_US',
    files: [
    dsl: 'less'

Could it be an issue of multiple theme inheritance?


I don't know if it's the case, but try to setup your theme settings with real file names on themes.js. For example, if you set "css/styles-m" and "css/styles-l", create less files in your theme.

While your theme has <parent>Magento/luma</parent> in theme.xml, it has inherited all styles.

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.