How to change permissions for yarn

When I try to create react app with yarn I get an error of permission denied. I can do sudo yarn… but I want yarn to operate without sudo command…

error Cannot create “/usr/local/bin/create-react-app” due to insufficient permissions.

1 Like
yarn config set prefix ~/.local

yarn global | Yarn