0

When ever I run bin/magento setup:static-content:deploy it outputs the following error:

Super13@Stone MINGW32 /d/xampp/htdocs/magento2-2.1.14 $ php bin/magento setup:static-content:deploy Requested languages: en_US Requested areas: adminhtml, frontend Requested themes: Magento/backend, Magento/blank, Magento/luma, Rahul/Theme1 PHP Fatal error: Uncaught TypeError: Argument 15 passed to Magento\Deploy\Model\Deploy\LocaleDeploy::__construct() must be of t array, null given, called in D:\xampp\htdocs\magento2-2.1.14\lib\internal\Magento\Framework\ObjectManager\Factory\AbstractFacto on line 111 and defined in D:\xampp\htdocs\magento2-2.1.14\app\code\Magento\Deploy\Model\Deploy\LocaleDeploy.php:177 Stack trace: 0 D:\xampp\htdocs\magento2-2.1.14\lib\internal\Magento\Framework\ObjectManager\Factory\AbstractFactory.php(111): Magento\Deploy Deploy\LocaleDeploy->__construct(Object(Symfony\Component\Console\Output\ConsoleOutput), Object(Magento\Translation\Model\Js\Con bject(Magento\Framework\View\Asset\Minification), Object(Magento\Framework\View\Asset\Repository), Object(Magento\Framework\View RepositoryFactory), Object(Magento\RequireJs\Model\FileManagerFactory), Object(Magento\Framework\RequireJs\ConfigFactory), Objec to\Framework\App\View\Asset\Publisher), Object(Magento\Framework\View\Asset\Bundle\Manager), Object(Ma in D:\xampp\htdocs\magent 14\app\code\Magento\Deploy\Model\Deploy\LocaleDeploy.php on line 177

Fatal error: Uncaught TypeError: Argument 15 passed to Magento\Deploy\Model\Deploy\LocaleDeploy::__construct() must be of the ty y, null given, called in D:\xampp\htdocs\magento2-2.1.14\lib\internal\Magento\Framework\ObjectManager\Factory\AbstractFactory.ph ne 111 and defined in D:\xampp\htdocs\magento2-2.1.14\app\code\Magento\Deploy\Model\Deploy\LocaleDeploy.php:177 Stack trace: 0 D:\xampp\htdocs\magento2-2.1.14\lib\internal\Magento\Framework\ObjectManager\Factory\AbstractFactory.php(111): Magento\Deploy Deploy\LocaleDeploy->__construct(Object(Symfony\Component\Console\Output\ConsoleOutput), Object(Magento\Translation\Model\Js\Con bject(Magento\Framework\View\Asset\Minification), Object(Magento\Framework\View\Asset\Repository), Object(Magento\Framework\View RepositoryFactory), Object(Magento\RequireJs\Model\FileManagerFactory), Object(Magento\Framework\RequireJs\ConfigFactory), Objec to\Framework\App\View\Asset\Publisher), Object(Magento\Framework\View\Asset\Bundle\Manager), Object(Ma in D:\xampp\htdocs\magent 14\app\code\Magento\Deploy\Model\Deploy\LocaleDeploy.php on line 177

This is with Magento 2.1.1 , XAMPP,Windows7.

0

1 Answer 1

0

This is due to the wrong ownership. So please assign correct user and web group to the project directory. I have followed these steps in my ubuntu OS

cd <root directory of magento>

find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} \;
find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} \;
chown -R magento:www-data .
chmod u+x bin/magento

Restart the apache server then it should work.

7
  • Can you please share commands to assign correct user and web group to the project directory in Xampp,Windows7
    – Rahul S
    Aug 22, 2019 at 11:48
  • cd <root directory of your project> chown -R magento:www-data . here magento is user and www-data is the web group. Aug 22, 2019 at 13:18
  • Hi, Im getting error - Super13@Stone MINGW32 /d/xampp/htdocs/magento2-2.1.14 $ chown -R magento:www-data . chown: invalid user: ‘magento:www-data’
    – Rahul S
    Aug 23, 2019 at 6:43
  • magento is my system's user, you can use your user name instead of magento Aug 23, 2019 at 7:03
  • Getting this error now- Super13@Stone MINGW32 /d/xampp/htdocs/magento2-2.1.14 $ chown -R Super13:www-data . chown: invalid group: ‘Super13:www-data’
    – Rahul S
    Aug 23, 2019 at 12:59

Your Answer

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

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