rgranadino / mage2_vagrant

Simple Magento 2 Vagrant Box
249 stars 68 forks source link

"Fatal error: Class 'Locale' not found" Error #42

Open angellromero opened 8 years ago

angellromero commented 8 years ago

Hey there, I was hoping for some words of wisdom here. When executing the task grunt exec:luma I get an error as such "Fatal error: Class 'Locale' not found in /Users/aromero/Sites/frontend/magento2/data/magento2/lib/internal/Magento/Framework/Locale/Bundle/DataBundle.php on line 64".

Any ideas on why I would get this error? Is there a system dependency missing?

rgranadino commented 8 years ago

Hi @angellromero, I haven't run grunt or anything frontend related with this VM so that would be new territory for me. Is there a page/procedure from the Magento 2 Documentation you're following? I'm looking for some steps to try and reproduce the issue and see what might be the cause.

It could be a bug in mage2 that you've run into tho.

angellromero commented 8 years ago

Hey @rgranadino thanks for the quick reply - so while within the Magento root directory once grunt is installed execute the following task - grunt exec:luma . This is mean to republish source files symlinks in pub static directory. On execution, the grunt tasks seem to run ok however there are internal processes occurring in which error out at the file listed above. I hope this info helps. Thanks again

See http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/css-guide/css_quick_guide_mode.html

bencorlett commented 8 years ago

@angellromero it looks like maybe you're running grunt from the host machine (your Mac) rather than the guest machine (judging off the path in the error message). In order for everything to work nicely, I would probably suggest running Grunt from the guest machine instead.

GitHubSergio commented 8 years ago

Hi there,

I tried to install GruntJS and I also came across the same message before realising I had to run grunt from the guest machine but when I tried to do that it didn't find the command grunt.

My Steps;

  1. From the guest machine navigate to the folder /vagrant/data/magento2
  2. Run grunt exec:
  3. It returns the message - "grunt: command not found"

If I try to install grunt on the guest machine via "npm install -g grunt-cli" the same error message for npm message is returned: "npm: command not found"

Any idea? am I doing something wrong?

Thanks in advance