Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run any firebase commands, permission denied #864

Closed
kogden opened this issue Aug 9, 2018 · 8 comments
Closed

Can't run any firebase commands, permission denied #864

kogden opened this issue Aug 9, 2018 · 8 comments

Comments

@kogden
Copy link

kogden commented Aug 9, 2018

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$`

@laurenzlong
Copy link
Contributor

laurenzlong commented Aug 9, 2018

Did you by any chance install firebase-tools with sudo? If you did, the uninstall and install it again with just npm i -g firebase-tools, if you get permission errors when doing that, check out this page for how to fix: https://docs.npmjs.com/getting-started/fixing-npm-permissions

@kogden
Copy link
Author

kogden commented 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.

@kogden kogden closed this as completed Aug 9, 2018
@laurenzlong
Copy link
Contributor

Thanks for sharing!

@kirtirajsinh
Copy link

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.

Still getting the same error.

@mansisinghal25
Copy link

@kogden Thank you so much!! This command worked for me. I had installed firebase using sudo.

@kattatzu
Copy link

kattatzu commented Jun 11, 2022

I solve with:

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

@Wxh16144
Copy link

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.

This command is not valid for me, but I can use sudo to reinstall it

@calebcadainoo
Copy link

Did you by any chance install firebase-tools with sudo? If you did, the uninstall and install it again with just npm i -g firebase-tools, if you get permission errors when doing that, check out this page for how to fix: https://docs.npmjs.com/getting-started/fixing-npm-permissions

Worked for me 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants