4
  • Old Version : 2.2.2
  • Upgraded Version : 2.2.4

i'm getting error while run command php bin/magento setup:upgrade

Module 'Magento_Store':
Module 'Magento_Directory':
Module 'Magento_Eav':
Module 'Magento_Theme':
Module 'Magento_Customer':
Upgrading data.. Area code not set: Area code must be set before starting a session.

I have tried with php bin/magento sampledata:reset but still not solved

1 Answer 1

1
vendor\magento\module-customer\Setup\UpgradeData.php

public function __construct(
        ...
        ...
        \Magento\Framework\App\State $state,

    ) {
        ...
        ...
        $state->setAreaCode(\Magento\Framework\App\Area::AREA_GLOBAL);

        );
    }

EDIT
get idea from ss which file have to change http://prntscr.com/mmj3oe

3
  • 3
    This is not an answer. Would you care to explain what this code is supposed to do?
    – Bathmat
    Commented Nov 17, 2018 at 18:10
  • 1
    @ketan Did you found the answer? Commented Feb 14, 2019 at 14:31
  • get idea from ss which file have to change prntscr.com/mmj3oe Commented Feb 18, 2019 at 7:10

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.