0
votes

I am trying to install Bootstrap, jquery, and even fontawesome with Bower and keep getting: Error: EACCES, permission denied. Here is the message:

/usr/local/lib/node_modules/bower/node_modules/insight/node_modules/configstore/index.js:46 throw err;

Error: EACCES, permission denied '/Users/joannak/.config/configstore/insight-bower.json' You don't have access to this file.

Why is this happening and how can I fix it. I checked and have the latest version of Bower 1.6.5 on my mac. Thanks!

2

2 Answers

1
votes

I had to correct my permissions to stop having this error.

I used chmod on my .config folder Recursively to correct my perimissions. Here are the commands:  ls -al .config

chmod -R aog+wxr .config

Problem resolved.

0
votes

It's happening because you don't have permission to access that file.

If you ls -l /Users/joannak/.config/configstore/insight-bower.json you should see this - permissions.

Try running sudo bower install --allow-root ....

Alternatively, you could chown or chmod the files, but that feels a little dirty.

More Details:

Try running:

chmod u+rw /Users/joannak/.config/configstore/insight-bower.json

If that doesn't work, because you're not the owner (which you can verify with ls -l), you need to make yourself the owner:

chown YOURUSERNAME /Users/joannak/.config/configstore/insight-bower.json

Might need to use sudo with the above commands.

Edit:

run chown -R YOURUSERNAME: ~/.config