I had this problem today. I ran a diff on the source code between 5.0.3 and 5.0.4 and found that the exports have changed. I also found that if I change the import statement to the following that it works with the latest version (5.3.0):
import firebase from '@firebase/app'
import '@firebase/auth'
Doing it this way will allow you to avoid the require
in the middle of your code, which is preferred imho.