question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't run any firebase commands, permission denied

See original GitHub issue

Alright so I have firebase-tools globally installed with npm. I ran into this problem before so I completely reinstalled node and npm to the latest versions and did the same with firebase.

Other packages work fine but firebase won’t even let me login.

`Kevin$ firebase login /Users/Kevin/.npm-global/lib/node_modules/firebase-tools/node_modules/configstore/index.js:69

throw err; ^

Error: EACCES: permission denied, open ‘/Users/Kevin/.config/configstore/update-notifier-firebase-tools.json.536079392’ You don’t have access to this file.`

I read that you have to change where your npm stores it’s global library. Well you can see I did that with .npm-global. And I set the prefix there too.

Is there something wrong with my $PATH? That should be fine too, right? This problem has been driving me crazy all day.

`echo $PATH

/usr/local/share/npm/bin:/usr/local/bin:/usr/local/sbin:~/bin:/Users/Kevin/.npm-global/bin:/Users/Kevin/.sdkman/candidates/gradle/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin$`

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

34reactions
kogdencommented, Aug 9, 2018

I don’t believe so, I’ve been extremely careful not to use sudo again.

Here’s what fixed me. Hope this helps someone if they run into the same problem.

sudo chown -R $USER ~/.config/configstore

Closing.

4reactions
kattatzucommented, Jun 11, 2022

I solve with:

chmod +x ~/.nvm/versions/node/v16.15.1/bin/firebase

Read more comments on GitHub >

github_iconTop Results From Across the Web

firebase-tools error: EACCES: permission denied
This looks like an issue with the permissions of modules you have npm installed. This is something lots of ...
Read more >
Firebase IAM permissions
Required to perform some Firebase management-specific actions. ... Grants permissions to check for the state of Google APIs and to run Firebase CLI...
Read more >
Permission denied issue with new Firebase. - Google Groups
Most likely this is because the Database of projects created in the new Firebase Console are readable/writeable only by users that are signed...
Read more >
firebase-tools - npm
If a command is project-specific, you must either be inside a project directory with an active project alias or specify the Firebase project...
Read more >
Request app permissions - Android Developers
In certain situations, the permission might be denied automatically, without the user taking any action. (A permission might be granted automatically as well.) ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found