Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

firebase-tools error: EACCES: permission denied

I am trying to deploy Firebase hosting of my web app.

At the command line, when I type firebase deploy, I get the following error.

Note: firebase deploy is just one example. The same error occurs for all firebase commands. (e.g., firebase --help, firebase -v, firebase login, firebase logout, etc.)

Error

/usr/local/lib/node_modules/firebase-tools/node_modules/configstore/index.js:53 throw err; ^

Error: EACCES: permission denied, open '/Users/mowzer/.config/configstore/update-notifier-firebase-tools.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/local/lib/node_modules/firebase-tools/node_modules/configstore/index.js:34:26)
at Object.Configstore (/usr/local/lib/node_modules/firebase-tools/node_modules/configstore/index.js:27:44)
at new UpdateNotifier (/usr/local/lib/node_modules/firebase-tools/node_modules/update-notifier/index.js:34:17)
at module.exports (/usr/local/lib/node_modules/firebase-tools/node_modules/update-notifier/index.js:123:23)
at Object. (/usr/local/lib/node_modules/firebase-tools/bin/firebase:5:48)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)

Everything I have tried so far (including every CLI firebase instruction) rejects me for lack of access.

What can I do? What should I try?

(I am on a Mac OSX Yosemite v10.10.5 and firebase-tools v3.0.3)

Edit: When I do sudo firebase deploy, I get the following error.

Error: The entered credentials were incorrect.

I tried the following solution.

I tried to delete problem files then reinstall firebase-tools.

Terminal.sh
cd
cd .config/configstore
# Delete problematic files
rm firebase-tools.json
override rw-------  root/staff for firebase-tools.json? y
rm update-notifier-firebase-tools.json
override rw-------  root/staff for update-notifier-firebase-tools.json? y
# Reinstall firebase-tools
cd
sudo npm install -g firebase-tools

Then...

cd path/to/directory
cd firebase deploy

Now this file generates the error:

/usr/local/lib/node_modules/firebase-tools/node_modules/configstore/index.js:53

cd /usr/local/lib/node_modules/firebase-tools/node_modules/configstore

like image 965
Let Me Tink About It Avatar asked Dec 09 '25 07:12

Let Me Tink About It


2 Answers

I fix it by adding sudo at the beginning of the command line!

like image 130
Tony Bui Avatar answered Dec 11 '25 22:12

Tony Bui


This looks like an issue with the permissions of modules you have npm installed. This is something lots of developers run into, and npm actually has some documentation on how to resolve it. Once you go through that, try again (you may need to re-install firebase-tools) and things should work.

like image 41
jwngr Avatar answered Dec 11 '25 22:12

jwngr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!