An abstract factory could not create an instance of magentoframeworkappdeploymentconfig(alias: Magento\Framework\App\DeploymentConfig).

Above error appears on di compile, cache clean etc.

I am not sure why this error appearing.

Is their any fix for this?

  • 1
    Please provide more details. Have you installed new module or did any customization? Please revert and try.
    – Nits
    Feb 8, 2021 at 11:56
  • Installed a module that have composer json with required 7.3 || 7.4 but my php version in system was 8 Feb 8, 2021 at 12:06
  • I have disabled the module & deleted composer.json file still error appears Feb 8, 2021 at 12:06
  • Looks like error due to php version, its 8.0 & i am using magento 2.3.5-p1 so php version it should be 7.3 Feb 8, 2021 at 12:23

1 Answer 1


It was php version issue, magento 2.3.5-p1 requires 7.3 php version, in system it was 8.0.

Setting php version 7.3, solves the error.

Your Answer

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

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