1

Recently I made my Magento 2.3.1 website live and set mode as "production". Now If I try to run php bin/magento setup:di:compile then it starts showing error

An error has happened during application run. See exception log for details.

In order to protect this I need to set Maintenance mode and website goes offline. Is it anyway by which we can run php bin/magento setup:di:compile and website will not show error.

Same thing happens during php bin/magento setup:upgrade. It distorted the page layout.

2
  • Yes it is in production mode Current application mode: production. (Note: Environment variables may override this value.) Commented Nov 27, 2019 at 12:39
  • ok wait am adding my ans! check it now
    – Pramod
    Commented Nov 27, 2019 at 12:39

2 Answers 2

0

Yes ofcourse there is.

First you just make it production skipping compilation.

php magento deploy:mode:set production --skip-compilation

Then, run

php bin/magento setup:di:compile

Voila, error will be shown. Try it.

1
  • My webiste is already in production mode and if run php bin/magento setup:di:compile then it shows errors Commented Nov 27, 2019 at 12:35
0

This is a pretty old error that has not yet fixed by magento but in order to fix this you can follow these steps-

add the expected library from require-dev to require, giving a require setting in PhpCsFixerReview.php

"require": {
    "magento/product-community-edition": "2.0.5",
    "composer/composer": "@alpha",
    "sjparkinson/static-review": "~4.1"
},

hope this will solve your issue

3
  • I am unable to find any file with name PhpCsFixerReview.php Commented Nov 27, 2019 at 12:54
  • me to cant find the file in directory Commented Nov 27, 2019 at 14:11
  • actually its a tool that automatically fixes all coding errors i think you are unaware of that
    – Pramod
    Commented Nov 28, 2019 at 5:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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