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 ? – Kishan Patadia Feb 27 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 Feb 27 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. – Ashish Madankar Jun 5 at 5:04
  • please check var log for more information about error. – Aasim Goriya Aug 3 at 11:16
  • run this command php bin/magento setup:static-contnet:deploy -f – Ansar Husain Aug 16 at 11:02

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.

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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