Static content deploy fails with missing locale

This issue appears mostly in Docker containers after initial build. If you try to run bin/magento setup:static-content:deploy you will get an error like this:

Argument has invalid value, please run info:language:list for list of available locale

The list of possible locales in Magento 2 is driven by options provided by ICU library/package. The ICU project homepage is If you run your environment based on Alpine Linux, you will need to install icu packages. This will provide the necessary locales.

apk add icu-dev icu-libs icu-data-full

After that, you can run bin/magento setup:static-content:deploy and it should work.

You may also like

Unit testing Magento 1

Writing unit tests for Magento 1 running in Docker Container

XSD validation in your IDE

Validate your XML files against Magento 2 XSD schemas

Debugging Magento CLI running in Docker container

Debugging Magento CLI running in Docker container

An error "Missed phrase" during Magento 2 phrase collection

Exception during phrase collection

Magento release 2.4.6 - what's new

New release of Magento 2

Mailhog PHP sendmail path configuration

Sending mails from PHP within Docker with Mailhog

Our Pimcore 11 upgrade notes

What we learned during upgrading Pimcore 10.x to 11.x