For me, this worked but I'm not sure about every case
run this in your bash
set NODE_OPTIONS=--openssl-legacy-provider
in package.json add
"scripts": { "start": "set NODE_OPTIONS=--openssl-legacy-provider && react- scripts start", "build": "set NODE_OPTIONS=--openssl-legacy-provider && react-scripts build" }