0

After successfully upgrade Magento from 2.1.16 to 2.2.5 when deploying the static content it throwing the below error, further debug to check file is present in the vendor folder.

Check Below Error in the console -

lenovo@lenovo-ThinkCentre-E73:/var/www/creativeroxyogi$ sudo bin/magento setup:static-content:deploy
[sudo] password for lenovo: 

Deploy using quick strategy
frontend/Magento/blank/en_US            910/1016            =========================>-- 89% %   7 secs
Compilation from source: /var/www/creativeroxyogi/vendor/magento/theme-frontend-blank/web/css/styles-m.less
Unable to get content for 'frontend/Magento/blank/en_US/css/source/lib/_lib.less'
Compilation from source: /var/www/creativeroxyogi/vendor/magento/theme-frontend-blank/web/css/email-fonts.less
Unable to get content for 'frontend/Magento/blank/en_US/css/source/lib/_lib.less'
Compilation from source: /var/www/creativeroxyogi/vendor/magento/theme-frontend-blank/web/css/styles-l.less
Unable to get content for 'frontend/Magento/blank/en_US/css/source/lib/_lib.less'
Compilation from source: /var/www/creativeroxyogi/vendor/magento/theme-frontend-blank/web/css/email-inline.less
Unable to get content for 'frontend/Magento/blank/en_US/css/source/lib/_lib.less'
Compilation from source: /var/www/creativeroxyogi/vendor/magento/theme-frontend-blank/web/css/print.less
Unable to get content for 'frontend/Magento/blank/en_US/css/source/lib/_lib.less'
Compilation from source: /var/www/creativeroxyogi/vendor/magento/theme-frontend-blank/web/css/email.less
Unable to get content for 'frontend/Magento/blank/en_US/css/source/lib/_lib.less'


  [Magento\Framework\Exception\FileSystemException]                                                                                                                                                        
  Cannot read contents from file "/var/www/creativeroxyogi/pub/static/frontend/Magento/blank/en_US/css/styles-m.css" Warning!file_get_contents(/var/www/creativeroxyogi/pub/static/frontend/Magento/blank  
  /en_US/css/styles-m.css): failed to open stream: No such file or directory  
  • Have you tried giving write permissions to pub/static ? – Abdul Pathan Jul 22 at 14:19
  • Yes I provide permission and delete the cache and generated folder as well but no luck – Yogendra - eCommerce Developer Jul 22 at 14:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.