Estoy tratando de enviar un mensaje usando signInWithPhoneNumber desde firebase pero recibo el siguiente error al implementar, también importé firebase con el mismo problema.
import firebase from 'firebase/app'; import { environment } from 'src/environments/environment'; export class TabPage implements OnInit{ code: string = '+91'; spin: boolean = false; otpSent:boolean = false; recaptchaverifier; confirmationResult: firebase.auth.ConfirmationResult; phoneNumber: string; ngOnInit(){ this.recaptchaverifier = new firebase.auth.RecaptchaVerifier('recaptcha-container'); this.sendOTP(); } sendOTP(){ var phNo = this.code+'******'; this.spin = true; firebase.auth().signInWithPhoneNumber(phNo,this.recaptchaverifier).then(result=>{ this.phoneNumber = phNo; this.otpSent = true; this.confirmationResult = result; this.spin = false; console.log(result); }).catch(err=>{ this.spin = false; alert(err); }); } }Solo está importando el SDK principal de Firebase. Para usar Firebase Authentication, también debe importar ese SDK agregando:
import 'firebase/auth';