Skip to content

Error on production deployment - "PHP Fatal error: Cannot instantiate interface" #3195

@lilmuckers

Description

@lilmuckers

Hi there

I have automated deployment of my magento 2 CE site using deploybot, and it's throwing the following error on the deployment:

PHP Fatal error: Cannot instantiate interface: Magento\Framework\Indexer\ConfigInterface

magento 2 is being deployed using git and composer - Where the only files in the git repo are the base stripped down directories:

app/design/<our themes>
app/code/<our modules>
.gitignore
composer.json

but basically it's the following (this isn't exactly it, but i am able to recreate the bug by doing this):

## Check out the repo
cd /var/www/releases/
git checkout <repo> 13245678
cd 13245678

##install the dependancies and config
composer install
ln -s /var/www/shared/env.php app/etc/env.php

##run magento deployment
php bin/magento deploy:mode:set production
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy

It seems that the setup:di:compile command is always returning the fatal error.
It doesn't seem to effect the site once it goes live - but i'm worried that something is wrong that i'm not seeing.

What am i doing wrong in my procedure?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions