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

PHP Fatal error: Uncaught TypeError: Argument 15 passed to Magento\Deploy\Model\Deploy\LocaleDeploy::__construct() must be of the type array, null given, called in /vagrant/project-community-edition/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on l ine 93 and defined in /vagrant/project-community-edition/vendor/magento/module-deploy/Model/Deploy/LocaleDeploy.php:177

with the stack trace of:

0 /vagrant/project-community-edition/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(93): Magento\Deploy\Model\Deploy\LocaleDeploy->__construct(Object(Symfony\Component\Console\Output\ConsoleOutput), Object(Magento\Translation\Model\Js\Config), Object (Magento\Framework\View\Asset\Minification), Object(Magento\Framework\View\Asset\Repository), Object(Magento\Framework\View\Asset\RepositoryFactory), Object(Magento\RequireJs\Model\FileManagerFactory), Object(Magento\Framework\RequireJs\ConfigFactory), Object(Magento\Fra mework\App\View\Asset\Publisher), Object(Magento\Framework\View\Asset\Bundle\Manager), Object(Ma in /vagrant/project-community-edition/vendor/magento/module-deploy/Model/Deploy/LocaleDeploy.php on line 177

This is with Magento 2.1.7.

Update: I did a fresh install and it turns out if you run php bin/magento setup:di:compile before you run setup:static-content:deploy it causes the error.

  • It is sad to see users who ask a question & never come to see the answers Commented Aug 16, 2017 at 18:55

2 Answers 2


I think there is a user permission issue on your vagrant. Try sudo php bin/magento setup:static-content:deploy to see if it solves the problem.


If that's a fresh installation, then it is surely a permissions issue

First of all, you'd know what is the group of your webserver user (typically www-data, if you use Apache)

Then you'd add your user (the one who owns the files and folders, and the one who executes bin/magento console commands) to webserver group. A trick to make things easier is adding the webserver user to your user group too

You can find here more info about managing users & groups in Linux

And then, in your Magento root folder, run this commands (in a Linux server, which is the most common case)

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 {} \;
sudo chown -R :<web server group> .
chmod u+x bin/magento

You can find here precise info about that

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.