In the latest version of firebase, I have to face this error, need some help
const user = query(collection(db, "users"), where("username", "==", username)); const querySnapshot = await getDoc(user)