Hi guys!
When I tried to deploy my portfolio in vercel (I also tried Netlify and gh-pages but same error) it showed this error in the build:

Locally it builds with success yarn run build.
I found a workaround though, it is to add --openssl-legacy-provider in react-scrips like this react-scripts --openssl-legacy-provider build. But it is not a good solution and does not address the root cause.
Does someone know what is causing and how to solve it?