1

I've cloned the blank theme for app/design/frontend/lima/mdl, swapping Magento/blank for lima/mdl and give this error:

Processed Area: frontend, Locale: pt_BR, Theme: lima/mdl, File type: less.

[InvalidArgumentException] Verify entered values of the argument and options. Unable to resolve the source file for 'frontend/lima/mdl/pt_BR/css/styles-m.less'

my files:

app/design/frontend/lima/mdl/registration.php

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
\Magento\Framework\Component\ComponentRegistrar::register(
 \Magento\Framework\Component\ComponentRegistrar::THEME,
 'frontend/lima/mdl',
 __DIR__
);

app/design/frontend/lima/mdl/theme.xml

<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
 <title>Lima MDL</title>
 <media>
 <preview_image>media/preview.jpg</preview_image>
 </media>
</theme>

app/design/frontend/lima/mdl/composer.json

{
 "name": "lima/mdl",
 "description": "N/A",
 "require": {
 "php": "7.0.2|7.0.4|~7.0.6|~7.1.0",
 "magento/framework": "101.0.*"
 },
 "type": "magento2-theme",
 "version": "100.2.1",
 "license": [
 "OSL-3.0",
 "AFL-3.0"
 ],
 "autoload": {
 "files": [
 "registration.php"
 ]
 }
}

dev/tools/grunt/configs/themes.js

module.exports = {
 blank: {
 area: 'frontend',
 name: 'Magento/blank',
 locale: 'pt_BR',
 files: [
 'css/styles-m',
 'css/styles-l',
 'css/email',
 'css/email-inline'
 ],
 dsl: 'less'
 },
 luma: {
 area: 'frontend',
 name: 'Magento/luma',
 locale: 'pt_BR',
 files: [
 'css/styles-m',
 'css/styles-l'
 ],
 dsl: 'less'
 },
 mdl: {
 area: 'frontend',
 name: 'lima/mdl',
 locale: 'pt_BR',
 files: [
 'css/styles-m',
 'css/styles-l'
 ],
 dsl: 'less'
 },
 backend: {
 area: 'adminhtml',
 name: 'Magento/backend',
 locale: 'pt_BR',
 files: [
 'css/styles-old',
 'css/styles'
 ],
 dsl: 'less'
 }
};

I am running:

grunt clean; grunt exec; grunt less:mdl; sudo chmod 777 -R var/*;

I solved fixing permissions in all project, but I still don't know why...

1 Answer 1

-4

You need to make sure that you run the commands from your Magento installation directory.

grunt clean: mdl
grunt exec: mdl
grunt less: mdl
chmod 0777 -R var/*
chmod 0777 -R pub/static/* 
chmod 0777 -R generated/* 
Grunt watch
Marius
199k55 gold badges431 silver badges837 bronze badges
answered Jul 26, 2021 at 10:57
1
  • Whatever you are hoping to accomplish (like here, apparently, post spam for your site), chmod 777 is wrong and dangerous. You absolutely do not want to grant write access to executable or system files to all users under any circumstances. You will want to revert to sane permissions ASAP (for your use case, probably chmod 755) and learn about the Unix permissions model before you try to use it again. If this happened on a system with Internet access, check whether an intruder could have exploited this to escalate their privileges. Commented May 6, 2024 at 9:10

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.