Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
lilmuckers opened this issue Jan 29, 2016 · 4 comments

Comments

@lilmuckers
Copy link

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?

@eddielau
Copy link
Contributor

eddielau commented Feb 5, 2016

@lilmuckers Do you have config.php in app/etc? From the example it looks like you did not install Magento correctly. Please use php bin/magento setup:install ..., then run php bin/magento deploy:mode:set production. Deploy mode set command should run code compilation and static content deployment for you.

@lilmuckers
Copy link
Author

we don't have a config.php

So you're saying i shouldn't just swap in the env.php - but instead run the install command on deployment?

okay, i'll give that a try.

@vrann vrann added PS labels Mar 8, 2016
@maksek
Copy link
Contributor

maksek commented May 9, 2016

@lilmuckers, any follow up on this? Did you try?

@veloraven
Copy link
Contributor

According to contributor guide, tickets without response for two weeks should be closed.
If this issue still reproducible please feel free to create the new one: format new issue according to the Issue reporting guidelines: with steps to reproduce, actual result and expected result and specify Magento version.

magento-engcom-team pushed a commit that referenced this issue Sep 26, 2018
[EngCom] Public Pull Requests - GraphQL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants