1

I NodeJs installed, I installed the Magento2 Grunt that works, but if I run the command "grunt deploy" it delete all from the folder pub/static/ but do not deploy and returns me the error below. Can someone help me?


Running "deploy" task

Cleaning "pub/static"...>> "pub/static" is empty.

Deploying Magento application...

Fatal error: Class 'Locale' not found in /Applications/MAMP/htdocs/magento/Projects/Magento2Theme/vendor/magento/framework/Locale/Bundle/DataBundle.php on line 64

Done, without errors.

4

You php do not have intl extension. You can verify it by run php -i.

In many cases this problem appear when you have different php version/configurations for apache and cli. For example if use install MAMP on MacOsX that you will have different version. To use php in this case you need specify full path to php like /Applications/MAMP/bin/php/php7.0.0/bin/php

To change it you need to do folowing steps:

Edit ~/.bash_profile and add

export PATH=/Applications/MAMP/bin/php/php7.x.x/bin:$PATH

where /Applications/MAMP/bin/php/php7.x.x should be patch to your latest wersion

In Terminal, run source ~/.bash_profile

In Terminal, type in which php and look for the updated patch. If everything was successful, It should output the new path to MAMP PHP install.

In case it doesn't output the correct path, try closing the terminal window (exit fully) and open again, it should apply the changes (Restart in short).

  • My Php version is 7.0.0 ------- php -v PHP 7.0.0 (cli) (built: Dec 8 2015 16:39:19) ( NTS ) Copyright (c) 1997-2015 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies ------ sh-3.2# which php /Applications/MAMP/bin/php/php7.0.0//bin/php ------- I know all these issues right version of PHP that were already done, and done correctly permissions (chmod and chown) and although these do not work. – St3phan Jun 8 '16 at 19:42
  • Do you see intl extension in "php -i" output? – KAndy Jun 8 '16 at 20:31
  • php -i -------- '--enable-intl' intl Internationalization support => enabled version => 1.1.0 ICU version => 52.1 ICU Data version => 52.1 Directive => Local Value => Master Value intl.default_locale => no value => no value intl.error_level => 0 => 0 intl.use_exceptions => 0 => 0 – St3phan Jun 8 '16 at 20:45
  • Installing php intl extension worked for me – Sukeshini Jul 4 '16 at 13:57

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.