Skip to content

Switching to production mode - deploying static content #6185

Closed
@sma09sjb

Description

@sma09sjb

I'm trying to switch to production mode on our live server.

Running CE 2.1.

bin/magento setup:upgrade

bin/magento indexer:reindex

bin/magento deploy:mode:set production -s

bin/magento setup:di:compile 

bin/magento setup:static-content:deploy

The final command throws the following error, and as a consequence non of the css/js is loaded, the site is unstyled.

Uncaught Error: Class 'Magento\Indexer\Model\Config\Reader' not found in /chroot/home/amritanu/amritanutrition.uat.quba.co.uk/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:93
Stack trace:
#0 /chroot/home/amritanu/amritanutrition.uat.quba.co.uk/html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Indexer...', Array)
#1 /chroot/home/amritanu/amritanutrition.uat.quba.co.uk/html/vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Indexer...')
#2 /chroot/home/amritanu/amritanutrition.uat.quba.co.uk/html/app/code/Manadev/Core/Registries/ConfigurationReaders.php(32): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Indexer...')
#3 /chroot/home/amritanu/amritanutrition.uat.quba.co.uk/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(93): Manadev\Core\Registries\ConfigurationReaders->__co in /chroot/home/amritanu/amritanutrition.uat.quba.co.uk/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93

I've tried deploying static content before running the compile command but this doesn't work either.
After running compile all subsequent commands throw this error.

I'm not sure what i'm doing wrong here?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions