When I was trying to create a new react app using npx create-react-app example_app
, I get this error
[Your cache folder contains root-owned
I also tried all of the above steps on my MAC Catalina, but didn't resolve my issue. These steps resolved my problem:
npm update
npx --ignore-existing create-react-app my-app
Thanks to this comment
Try sudo npx create-react-app example_app
or in my case sudo npm install @vue/cli
I tried everything else here, but in the end realised that it might just be the command that I was running was not able to escalate the correct permissions.
It helped me: Remove and install npm again