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.
1 Answer 1
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– St3phan2016年06月08日 19:42:18 +00:00Commented Jun 8, 2016 at 19:42
-
Do you see intl extension in "php -i" output?KAndy– KAndy2016年06月08日 20:31:32 +00:00Commented Jun 8, 2016 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 => 0St3phan– St3phan2016年06月08日 20:45:12 +00:00Commented Jun 8, 2016 at 20:45
-
Installing php intl extension worked for meSukeshini– Sukeshini2016年07月04日 13:57:06 +00:00Commented Jul 4, 2016 at 13:57