setup upgrade command throws error while Installing data Area code is not set. The issue is coming from webkul core module. Anybody faced similar issue?
1 Answer
Fixed! I added this in installData.php
- protected $state;
- \Magento\Framework\App\State $appState in __construct params
- $this->state = $appState;
And below code in start of install() function:
try{
$this->state->getAreaCode();
}
catch (\Magento\Framework\Exception\LocalizedException $ex) {
$this->state->setAreaCode('adminhtml');
}
-
I face the same issue at the time of setup upgrade for the Webkul_MpShipStation module, I try the above solution but not works. Commented Dec 22, 2020 at 7:44