Magento2: Please re-run Magento compile command

Created on 21 Nov 2015  路  12Comments  路  Source: magento/magento2

Hi Team

After Fresh installation of Magento 2 General availability. When i try to magento setup:upgrade
It throws error Please re-run Magento compile command.
Kindly help.
Server : Wamp

Ready for Work

Most helpful comment

It would be useful if the message said what "Magento compile command" means.
Is it magento setup:di:compile?

All 12 comments

As I understand, the message Please re-run Magento compile command could be just ignored, because Magento 2 compiles the files automatically on the first page load:
http://magento.stackexchange.com/questions/90858/magento2-dicompile-error#comment121216_90866

Yes in default or developer mode. If you're in production mode you need to either run the CLI command to set production mode or run the individual compile commands with a -S switch on set production mode command (so it doesn't re-run the compile commands again)

@SasiKiranK Has your issue been resolved?

It would be useful if the message said what "Magento compile command" means.
Is it magento setup:di:compile?

Yes

(@deltab proposed in #4134)

bin/magento setup:di:compile

Work fine to me Thanks @deltab 馃憤

Update:
To compile this correctly and without errors, its advisable to use the following command with some php flags:

php -d set_time_limit=3600 -d memory_limit=1024M bin/magento setup:di:compile

first off i only got here by googling "Please re-run Magento compile command"

It would be nice if the code that spits that phrase out would just say

"Please re-run Magento compile command: magento setup:di:compile"

it gets confusing

@rip057 I made the informational message more informative back in April (#4134) but my changes were not immediately accepted by the Magento team.

This works like a charm. Thanks..

Please re-run Magento compile command, I am also seeing this error after I ran this command;php bin/magento setup:upgrade. web page landing so slow and even the logo of the page is gone. I have a double check in conen>>configuration whether the theme I installed is available or not. I don't even see my paid theme. Help will be appreciated.

The command to start Magento 2 compilation progress is:
php bin/magento setup:di:compile
If you see the error about php memory limit when compiling code, run this command
php -dmemory_limit=4G bin/magento setup:di:compile
You will see this message if the compile command runs properly

C:\xampp\htdocs\magento2>php bin/magento setup:di:compile
Compilation was started.
App action list generation... 8/8 [============================] 100% 4 mins 352.0 MiB
Generated code and dependency injection configuration successfully.

Reference source: https://magentip.com/please-re-run-magento-compile-command-magento-2/

Was this page helpful?
0 / 5 - 0 ratings