Value of type 'any Authentication' has no member 'createUser'

I am making an application in Xcode using SwiftUI but I am getting this error when I try to create a new user.

private func signUp() {
            .createUser(email: email,
                        password: password,
                        connection: "Username-Password-Authentication",
                        userMetadata: ["first_name": firstName, "last_name": lastName, "dob": dob])
            .start { result in
                switch result {
                case .success(let user):
                    isSignUpSuccessful = true
                    print("User created: \(user)")
                case .failure(let error):
                    print("Error creating user: \(error)")