Change import firebase from "firebase/compat"; to import firebase from "firebase/compat/app";
It seems next-auth/client was renamed to next-auth/react in v4