Netlify CLI, permission denied to config file. Can't run any command

I installed the netlify-cli package globally using npm install netlify-cli -g , the installation completed. After that I ran netlify command and got this error

Error: EACCES: permission denied, open '/Users/{USER_FOLDER}/Library/Preferences/netlify/config.json.2846113261' You don't have access to this file.

To Reproduce

Steps to reproduce the behavior:

  1. Run npm install netlify-cli -g
  2. Installation succeed
  3. Run netlify
  4. Gets the error about not having access to config.json file
1 Like

hi there, thats definitely frustrating! does your terminal instance have suffcient privileges for this to run properly? Are you running it as an administrator if you are on windows?

I am facing exactly same issue here

Try this solution. This fixed for me

1 Like

It worked! thank you!

1 Like