The error “unable to get local issuer certificate” occurs because Yarn is failing to establish a secure connection due to SSL certificate issues.
Run the following command in your terminal to fix this issue
yarn config set strict-ssl false
After this run the following command
yarn install
If it works, then it is an SSL certificate issue.