• 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


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

    ) {


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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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