linuxbashubuntunpmrc

.npmrc permission denied every time I open the terminal


I've been getting this annoying error everytime I open a new terminal window or tab saying:

bash: /.npmrc: Permission denied

And that is it, I have been trying to find a solution (unsuccessfully) for some time now. I've found that people had issue with other files but not with .npmrc. I'm running Ubuntu 22.04 if it is of any help.

Thanks!


Solution

  • Did you try sudo chown -Rv ${USER}:${USER} /.npmrc ?