0

I've been trying to figure out this issue for some time now and I am getting extremely frustrated. I installed bower and now I am trying to do bower init. I Am able to get through the guided set up. Once I answer : Looks good? I get an Error:EACCESS,open '/var/www/public/bower.json' and after is console trace with standardRenderer.error being the first item. I also get an error when i just use bower install angular.

How do I resolve this issue?

thanks

Jason Spick
  • 6,028
  • 13
  • 40
  • 59

2 Answers2

2

After doing some insane digging, I found it was a multitude of permission issues. Referencing these 2 related questions:

Do this order:

  1. sudo chown -R $(whoami) ~/.npm (Noah)
  2. sudo chown -R $(whoami) ~/npm/lib/node_modules/ to set permission on already installed modules (Brad Parks)
  3. sudo chown -R $(whoami) /var/www Potecaru Tudor
Community
  • 1
  • 1
Jason Spick
  • 6,028
  • 13
  • 40
  • 59
0

Can you try doing below steps -

sudo npm install -g bower

bower cache clean

sudo rm -rf ~/.bower

bower init

If above steps don't fix then the configstore might be removed by one of your program for some reason.

In this case you can go to open your terminal and type:

open Users/[your username]/.config

[your username] should be your username. I assume it's jason.

And then you create a folder called configstore!

Done.

SantanuMajumdar
  • 886
  • 1
  • 5
  • 20