- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
I'm trying to create luma2 theme based on luma. I've created the below files:
app/design/frontend/Pontorez/luma2/composer.json
{ "name": "magento/theme-frontend-luma", "description": "N/A", "config": { "sort-packages": true }, "require": { "php": "~7.1.3||~7.2.0", "magento/framework": "*", "magento/theme-frontend-blank": "*" }, "type": "magento2-theme", "license": [ "OSL-3.0", "AFL-3.0" ], "autoload": { "files": [ "registration.php" ] } }
app/design/frontend/Pontorez/luma2/registration.php
<?php use \Magento\Framework\Component\ComponentRegistrar; ComponentRegistrar::register(ComponentRegistrar::THEME, 'frontend/Pontorez/luma2', __DIR__);
app/design/frontend/Pontorez/luma2/theme.xml
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd"> <title>Luma2</title> <parent>Magento/luma</parent> </theme>
and empty directories:
app/design/frontend/Pontorez/luma2/web/css/source
app/design/frontend/Pontorez/luma2/web/fonts
app/design/frontend/Pontorez/luma2/web/images
app/design/frontend/Pontorez/luma2/web/js
I'm trying to deploy it using the below commands
rm -r /home/example/public_html/2020/pub/static/* rm -r /home/example/public_html/2020/var/view_preprocessed/* php magento setup:static-content:deploy
But the last command fails because
Compilation from source /home/example/public_html/2020/vendor/magento/theme-frontend-blank/web/js/navigation-menu.js failed Magento\Framework\View\Asset\File\NotFoundException: Unable to resolve the source file for 'frontend/Pontorez/luma2/en_US/js/navigation-menu.js' in /home/example/public_html/2020/vendor/magento/framework/View/Asset/File.php:160 Stack trace: #0 /home/example/public_html/2020/vendor/magento/framework/App/View/Asset/Publisher.php(74): Magento\Framework\View\Asset\File->getSourceFile() #1 /home/example/public_html/2020/vendor/magento/framework/App/View/Asset/Publisher.php(62): Magento\Framework\App\View\Asset\Publisher->publishAsset(Object(Magento\Framework\View\Asset\File)) #2 /home/example/public_html/2020/vendor/magento/module-deploy/Service/DeployStaticFile.php(89): Magento\Framework\App\View\Asset\Publisher->publish(Object(Magento\Framework\View\Asset\File)) #3 /home/example/public_html/2020/vendor/magento/module-deploy/Service/DeployPackage.php(189): Magento\Deploy\Service\DeployStaticFile->deployFile('js/navigation-m...', Array) #4 /home/example/public_html/2020/vendor/magento/module-deploy/Service/DeployPackage.php(133): Magento\Deploy\Service\DeployPackage->processFile(Object(Magento\Deploy\Package\PackageFile), Object(Magento\Deploy\Package\Package)) #5 /home/example/public_html/2020/vendor/magento/module-deploy/Service/DeployPackage.php(102): Magento\Deploy\Service\DeployPackage->deployEmulated(Object(Magento\Deploy\Package\Package), Array, false) #6 [internal function]: Magento\Deploy\Service\DeployPackage->Magento\Deploy\Service\{closure}() #7 /home/example/public_html/2020/vendor/magento/framework/App/State.php(187): call_user_func_array(Object(Closure), Array) #8 /home/example/public_html/2020/vendor/magento/module-deploy/Service/DeployPackage.php(103): Magento\Framework\App\State->emulateAreaCode('frontend', Object(Closure)) #9 /home/example/public_html/2020/vendor/magento/module-deploy/Process/Queue.php(346): Magento\Deploy\Service\DeployPackage->deploy(Object(Magento\Deploy\Package\Package), Array) #10 /home/example/public_html/2020/vendor/magento/module-deploy/Process/Queue.php(248): Magento\Deploy\Process\Queue->execute(Object(Magento\Deploy\Package\Package)) #11 /home/example/public_html/2020/vendor/magento/module-deploy/Process/Queue.php(229): Magento\Deploy\Process\Queue->executePackage(Object(Magento\Deploy\Package\Package), 'frontend/Pontor...', Array, false) #12 /home/example/public_html/2020/vendor/magento/module-deploy/Process/Queue.php(170): Magento\Deploy\Process\Queue->assertAndExecute('frontend/Pontor...', Array, Array) #13 /home/example/public_html/2020/vendor/magento/module-deploy/Strategy/QuickDeploy.php(76): Magento\Deploy\Process\Queue->process() #14 /home/example/public_html/2020/vendor/magento/module-deploy/Service/DeployStaticContent.php(115): Magento\Deploy\Strategy\QuickDeploy->deploy(Array) #15 /home/example/public_html/2020/setup/src/Magento/Setup/Console/Command/DeployStaticContentCommand.php(140): Magento\Deploy\Service\DeployStaticContent->deploy(Array) #16 /home/example/public_html/2020/vendor/symfony/console/Command/Command.php(255): Magento\Setup\Console\Command\DeployStaticContentCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /home/example/public_html/2020/vendor/symfony/console/Application.php(1001): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /home/example/public_html/2020/vendor/symfony/console/Application.php(271): Symfony\Component\Console\Application->doRunCommand(Object(Magento\Setup\Console\Command\DeployStaticContentCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 /home/example/public_html/2020/vendor/magento/framework/Console/Cli.php(115): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #20 /home/example/public_html/2020/vendor/symfony/console/Application.php(147): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #21 /home/example/public_html/2020/bin/magento(23): Symfony\Component\Console\Application->run() #22 {main} Compilation from source: /home/example/public_html/2020/vendor/magento/theme-frontend-blank/web/css/print.less Compilation from source: LESS file is empty: frontend/Pontorez/luma2/en_US/css/print.less
Full output: https://pastebin.com/T9E3W1Be
Can you help please? Thanks
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @Pontorez
try to remove all empty folder and run setup upgrade and then do deploy.
If works then mark as solution
Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @Pontorez
try to remove all empty folder and run setup upgrade and then do deploy.
If works then mark as solution
Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Custom theme based on luma: Unable to resolve the source file
Hello,
Especially you needs to remove empty folder which located inside app/design/frontend/ directory.
After that run below commands:
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
It will fix your issue surely.