Cannot call value of non function type 'module <Firebase>'

I got this error 'Cannot call value of non-function type 'module<Firebase>'' The code is copied from a tutorial sample project. But no errors in the sample project. The

sample project moved from Xcode 7 to 8 and I had chaged the syntax before copy. What is my problem? I will be very appreciate if anyone helped my. Thanks

fileprivate var _BASE_REF = Firebase(url: "\(BASE_URL)")//error here
    fileprivate var _USER_REF = Firebase(url: "\(BASE_URL)/users")//error here
    fileprivate var _JOKE_REF = Firebase(url: "\(BASE_URL)/jokes")//error here
    var BASE_REF: Firebase {// another error: Use of undeclared identifier type 'Firebase'
        return _BASE_REF!
    }
    var USER_REF: Firebase {// another error: Use of undeclared identifier type 'Firebase'
        return _USER_REF!
    }
    var CURRENT_USER_REF: Firebase {// another error: Use of undeclared identifier type 'Firebase'
        let userID = UserDefaults.standard.value(forKey: "uid") as! String
  
        let currentUser = Firebase(url: "\(BASE_REF)").child(byAppendingPath: "users").child(byAppendingPath: userID)
  
        return currentUser!
    }
    var JOKE_REF: Firebase {// another error: Use of undeclared identifier type 'Firebase'
        return _JOKE_REF!
    }

Anyone please help me?

I changed the code to

static let dataService = DataService()
    fileprivate var _BASE_REF = Database.database().reference()
    fileprivate var _USER_REF = Database.database().reference()
    fileprivate var _JOKE_REF = Database.database().reference()
  
    var BASE_REF: DatabaseReference {
        return _BASE_REF
    }
  
    var USER_REF: DatabaseReference {
        return _USER_REF
    }
  
    var CURRENT_USER_REF: DatabaseReference {
        let userID = UserDefaults.standard.value(forKey: "uid") as! String
      
        let currentUser = Database.database().reference().child(byAppendingPath: "users").child(byAppendingPath: userID)
      
        return currentUser
    }
  
    var JOKE_REF: DatabaseReference {
        return _JOKE_REF
    }

Error fixed but I got new error 'Value of type 'DatabaseReferences' has no member 'authData' in :

if UserDefaults.standard.value(forKey: "uid") != nil && DataService.dataService.CURRENT_USER_REF.authData != nil

Anyone knows how to fix this? Please help me. Thanks

Anyone please help?

Anyone please help?

Cannot call value of non function type 'module &lt;Firebase&gt;'
 
 
Q