node.js 中未定义 Firebase createUserWithEmailAndPassword 方法

Firebase createUserWithEmailAndPassword method is undefined in node.js

启动有问题..

我初始化了我的 firebase 应用程序。但是 auth() 不工作

var auth = firebase.auth();
console.log(auth.createUserWithEmailAndPassword)

createUserWithEmailAndPassword returns 未定义。

它也给出函数错误

var email = "mail@mail.com"
var password = 123

var auth = firebase.auth();
auth.createUserWithEmailAndPassword(email, password).then(function(result) {
    console.log(result)
}).catch(function(error) {
    console.log(error)
});

错误:

TypeError: auth.createUserWithEmailAndPassword is not a function

有什么问题?

Firebase 3.0.5 中没有用于 node.js 的方法 createUserWithEmailAndPassword,查看 documentation