1

After Install Magento2.3 by cli and when try upgrade command getting below Error:

php bin/magento setup:upgrade

The directory "generated/code/Magento/Backend/App/Request" cannot be deleted Warning!rmdir(generated/code/Magento/Backend/App/Request): Directory not empty The directory "generated/code/Magento/Catalog/Model/ResourceModel" cannot be deleted Warning!rmdir(generated/code/Magento/Catalog/Model/ResourceModel): Directory not empty The directory "generated/code/Magento/Catalog/Ui/DataProvider" cannot be deleted Warning!rmdir(generated/code/Magento/Catalog/Ui/DataProvider): Directory not empty The directory "generated/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext" cannot be deleted Warning!rmdir(generated/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext): Directory not empty The directory "generated/code/Magento/Directory/Helper" cannot be deleted Warning!rmdir(generated/code/Magento/Directory/Helper): Directory not empty The directory "generated/code/Magento/Eav/Model/Adminhtml/System/Config" cannot be deleted Warning!rmdir(generated/code/Magento/Eav/Model/Adminhtml/System/Config): Directory not empty The directory "generated/code/Magento/Framework/App/Config" cannot be deleted Warning!rmdir(generated/code/Magento/Framework/App/Config): Directory not empty The directory "generated/code/Magento/Framework/Data/Argument" cannot be deleted Warning!rmdir(generated/code/Magento/Framework/Data/Argument): Directory not empty The directory "generated/code/Magento/Framework/Event/Config" cannot be deleted Warning!rmdir(generated/code/Magento/Framework/Event/Config): Directory not empty The directory "generated/code/Magento/Framework/ObjectManager/Config/Reader" cannot be deleted Warning!rmdir(generated/code/Magento/Framework/ObjectManager/Config/Reader): Directory not empty The directory "generated/code/Magento/Framework/Session/Config" cannot be deleted Warning!rmdir(generated/code/Magento/Framework/Session/Config): Directory not empty The directory "generated/code/Magento/Swatches/Block/Adminhtml/Product/Attribute" cannot be deleted Warning!rmdir(generated/code/Magento/Swatches/Block/Adminhtml/Product/Attribute): Directory not empty The directory "generated/code/Magento/Ui/Config" cannot be deleted Warning!rmdir(generated/code/Magento/Ui/Config): Directory not empty

Any one can help me for this. I have already set write/read all permission.

7
  • delete your generated folder and try it will work
    – MageLerner
    Oct 14 '19 at 8:14
  • do you means generated root folder or var/generated folder..? Oct 14 '19 at 8:16
  • var/generated folder
    – MageLerner
    Oct 14 '19 at 8:16
  • inside var folder not have any generated folder. Oct 14 '19 at 8:18
  • sorry you are using mage2.3 ver so you should delete root generated folder.But make sure don't delete .htaccess inside this folder
    – MageLerner
    Oct 14 '19 at 8:19
1

Try below steps:-

sudo rm -rf var/*
sudo rm -rf pub/static/frontend/*
sudo rm -rf generated/*

sudo chmod -R 777 /var/www/html/(project name)/
sudo php bin/magento setup:upgrade
sudo php bin/magento setup:static-content:deploy -f
sudo php bin/magento ca:cl
sudo php bin/magento ca:fl
sudo chmod -R 777 /var/www/html/(project name)/

Hope this will help you..!

2
  • delete your generated a folder and then try to upgrade command
    – Devidas
    Oct 14 '19 at 8:23
  • Not working..CSS/JS is not load on frontend/backend Oct 14 '19 at 12:07
1

When using windows and you have installed GIT then you have a option to run some linux command over windows using GIT BASH

Open GIT BASH using right click from your root folder and try to run below command

 rm -rf var/*
 rm -rf pub/static/frontend/*
 rm -rf generated/code/*

 chmod -R 777 /var/www/html/(project name)/
 php bin/magento setup:upgrade
 php bin/magento setup:static-content:deploy -f
 php bin/magento ca:cl
 php bin/magento ca:fl
 chmod -R 777 /var/www/html/(project name)/

CSS/JS is not load on frontend/backend

for this check pub folder .htacess files and find the code like IfVersion and delete.

2
  • Not working..CSS/JS is not load on frontend/backend Oct 14 '19 at 12:07
  • updated answer please check. Oct 16 '19 at 14:29
0

The command 'del' or 'rmdir' will remove the recursive directories based on your OS edition.

Ref: https://superuser.com/questions/179660/how-to-recursively-delete-directory-from-command-line-in-windows

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .