The Problem

Fatal error: Uncaught Error: Class ‘Locale’ not found in lib/internal/Magento/Framework/Locale/Bundle/DataBundle.php:64

Most of the cases this error appears when you are trying to deploy using grunt with OSX using MAMP.

The main cause of this problem is that grunt is trying to compile using your OSX Php version, which hasn’t installed the php_intl extension.

IMPORTANT: If you are not using a Mac, you probably just need to install php-intl to your php version. For server and cli.

The Solution

Asuming you are using ~/.bash_profile as your profile file, you just need to edit it and append the following line at the end of it.

Then execute the following command:

Then you should be able to perform a “grunt exec” command as usual.

NOTE: Your profile file may have a different name depending on your local configuration. Some alternatives are ~/.bashrc, ~/.zshrc (if you installed OhMyZsh).

Leave a comment