.npmrc permission denied every time I open the terminal

51 Views Asked by At

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!

1

There are 1 best solutions below

2
On BEST ANSWER

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