There is no di folder generated in var directory. I am getting please re-run compile command. Why we need this di directory?
If you have upgraded to Magento version 2.2.* then
var/generation has been moved to generated/code
var/di has been moved to generated/metadata
There shouldn't be var/di and var/generation folders after the upgrade.
di folder are generate at compile time inside var folder.
remove content of generation folder. if di folder is not available first create di folder inside var folder.
php bin/magento setup:di:compile
You are probably running Magento in developer mode. In developer mode, var/di is not generated and should be deleted.. Never run compile commands in developer mode (see also: Which compilation commands are needed in developer mode and when?)
Also, if you are in developer mode and previously used compile commands, or switched from production mode:
The message you received is misleading, it only applies to production mode!
di folder is generated by magento itself. Each time you run:
Magento will generate the files
Magento itself creates the directory,
Missing of this directory (may be due to permission issue) causes
please re-run compile command
message during running of
I also faced same issue. Then I manually created 'di' directory inside 'var' directory and set proper permission. It solved this issue for me. Then after I didn't get any such message.