When I was trying to create a new react app using npx create-react-app example_app, I get this error
npx create-react-app example_app
[Your cache folder contains root-owned
Try sudo npx create-react-app example_app or in my case sudo npm install @vue/cli
sudo npx create-react-app example_app
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.