Environment Variable is set but I cannot get it from process.env in a react app in production

The WTF Ever got the case where you console.log(process.env) and you see your env variable right there, with the right value, but when you do console.log(process.env.YOUR_VAR) you get a mere empty string? Here s my story on how I shot myself in the foot and needed 3 days to figure out why my env variable was [ ]