Issue
I am trying to npm install my in react project and am getting this error:
I've tried sudo chown -R whoami
to working directory and still no luck..
what else can i do?
Solution
This is a common problem when you install packages using sudo
. That's why you shouldn't install any package using sudo
keyword.
The solution:
Delete node_modules
folder. If it says that you don't have permission than delete it directly from folder (not from IDE) or through terminal.
After that install your packages again. This time only npm i
without sudo.
Answered By - Getsumi3