Skip to content

Area code is already set #15

@deancodes

Description

@deancodes

Hi there, I just wanted to raise an issue we have started experiencing.

bin/magento m2bp:critical-css:generate will throw the following error:

In State.php line 136: Area code is already set

I believe the solution is to modify line 84 of vendor/m2-boilerplate/module-critical-css/src/Console/Command/GenerateCommand.php to:

            if ( ! $this->state->getAreaCode()) {
                $this->state->setAreaCode(\Magento\Framework\App\Area::AREA_ADMINHTML);
            }

I have confirmed this resolved our issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions