Is there a solution to a react installation error?

26 Views Asked by At

I tried running react-create-app (app_name) but ended up having a problem. I also tried cleaning the cache, --force, same issue. I tried deleting the node module file I previously had and reinstallingenter image description here but still ended up with the same problem.

I need to install the react app to begin working on the project.

1

There are 1 best solutions below

0
Yuvaraj M On

Change the permission of npm's cache directory

  1. Find the path of npm cache

    $ npm config get cache

    This will give you, for osx /Users/name/.npm

  2. Change the ownership to current user

    $ sudo chown -R $(whoami) $(npm config get cache)

    This changes the permission to the subfolders also.

More on Fixing npm EACCESS errors