Home > Software engineering >  npm install: Ecacess: permission denied
npm install: Ecacess: permission denied

Time:10-26

I am trying to npm install my in react project and am getting this error: enter image description here

I've tried sudo chown -R whoami to working directory and still no luck.. what else can i do?

CodePudding user response:

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.

  • Related