Skip to content

Instantly share code, notes, and snippets.

@davidalves1
Last active August 26, 2016 11:14
Show Gist options
  • Save davidalves1/22c617c04337ab1a7e3bb4fba8168666 to your computer and use it in GitHub Desktop.
Save davidalves1/22c617c04337ab1a7e3bb4fba8168666 to your computer and use it in GitHub Desktop.
Resolver problema 'EACCES: permission denied' ao executar o Bower utilizando o Ubuntu

Referência

Problema: Ao instalar o Bower no Ubuntu ocorre o erro:

user@user-pc:~/Documents/projects/bower-test$ bower install angular
/usr/lib/node_modules/bower/lib/node_modules/configstore/index.js:54
				throw err;
				^

Error: EACCES: permission denied, open '/home/user/.config/configstore/bower-github.json'
You don't have access to this file.

    at Error (native)
    at Object.fs.openSync (fs.js:549:18)
    at Object.fs.readFileSync (fs.js:397:15)
    at Object.create.all.get (/usr/lib/node_modules/bower/lib/node_modules/configstore/index.js:35:26)
    at Object.Configstore (/usr/lib/node_modules/bower/lib/node_modules/configstore/index.js:28:44)
    at readCachedConfig (/usr/lib/node_modules/bower/lib/config.js:19:23)
    at defaultConfig (/usr/lib/node_modules/bower/lib/config.js:11:12)
    at Object.<anonymous> (/usr/lib/node_modules/bower/lib/index.js:16:32)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)

Resolução: Executar o comando abaixo substituindo <user> pelo seu usuário

sudo chown -R <user>:<user> /home/<user>/.config/configstore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment