I have tried to run this php bin/magento setup:static-contnet:deploy command on the magento root folder then it showing the below error

"Notice: Undefined offset: 0 in /home/nuluv938/public_html/vendor/magento/module-deploy/Console/Command/DeployStaticContentCommand.php on line 403"

While rest commands are working fine.

Without running the deploy command I am unable to create the front-end folder inside the pub/static path directory.

  • Which is your magento and php version ? Commented Feb 27, 2018 at 7:03
  • versions: magento2.2.2 and PHP Version 7.0.27. Yesterday it was working perfect but Now it is not working.
    – Banvari
    Commented Feb 27, 2018 at 7:09
  • @Banvari Have you got any solution for this I am also facing same issue. I will be very thankful for you help. Commented Jun 5, 2018 at 5:04
  • please check var log for more information about error. Commented Aug 3, 2018 at 11:16
  • run this command php bin/magento setup:static-contnet:deploy -f Commented Aug 16, 2018 at 11:02

2 Answers 2


This issue generally occurs when you keep backup folders in module/theme view files




Remove backup files and try again, it would be working fine.

  • Yes it worked for e as well. Thank you.
    – Zeeshan
    Commented Oct 17, 2019 at 11:43

In my case, I have got error like

Notice: Undefined offset: 0 in /html/vendor/magento/module-deploy/Source/Modules.php on line 49

app static folder or view has the wrong name or contains another folder compare to the view structure enter image description here

check folder name and run php bin/magento setup:static-content:deploy -f

it's work for me. I hope it will help you

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.