Firebase createUserWithEmailAndPassword方法在node.js中未定义 [英] Firebase createUserWithEmailAndPassword method is undefined in node.js

查看:135
本文介绍了Firebase createUserWithEmailAndPassword方法在node.js中未定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

启动时出现问题。



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

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

createUserWithEmailAndPassword 返回undefined。

它也给函数错误

pre $ 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。日志(错误)
});

错误:


TypeError:auth.createUserWithEmailAndPassword不是函数

是什么问题?
<解决方案

在Firebase 3.0.5中,对于node.js,没有方法createUserWithEmailAndPassword,请参阅文档


There is a problem in starting..

I initialized my firebase app. But auth() is not working

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

createUserWithEmailAndPassword returns undefined.

It also gives function error

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)
});

The error:

TypeError: auth.createUserWithEmailAndPassword is not a function

What is the problem?

解决方案

There is no method createUserWithEmailAndPassword in Firebase 3.0.5 for node.js, look at documentation

这篇关于Firebase createUserWithEmailAndPassword方法在node.js中未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆