TypeError: undefined is not a function
See original GitHub issueI am using stenciljs (Ionic pwa) and I am trying to embed the firebaseui in the applications. There error I get is this:
TypeError: undefined is not a function at new Sn (app-home.entry.js?s-hmr=367787020388:formatted:4184) at AppHome.componentDidLoad (app-home.entry.js?s-hmr=367787020388:formatted:4225) at safeCall (chunk-3853a083.js:1361) at postUpdateComponent (chunk-3853a083.js:1291) at updateComponent (chunk-3853a083.js:1273) at Array.update (chunk-3853a083.js:1205) at consumeTimeout (chunk-3853a083.js:120) at flush (chunk-3853a083.js:143)
And this is my code:
import { Component, h } from ‘@stencil/core’; import { firebase } from ‘@firebase/app’; import ‘@firebase/auth’; import * as firebaseui from ‘firebaseui’; import { firebaseConfig } from ‘…/…/helpers/config’;
@Component({ tag: ‘app-home’, styleUrl: ‘app-home.css’ }) export class AppHome {
componentDidLoad(){ firebase.initializeApp(firebaseConfig); var ui = new firebaseui.auth.AuthUI(firebase.auth()); console.log(ui); ui.start(‘#firebaseui-auth-container’, { signInOptions: [ { provider: firebase.auth.EmailAuthProvider.PROVIDER_ID, requireDisplayName: false } ] }); } render() { return [
> <ion-header>
> </ion-header>,
> <ion-content class="ion-padding">
> <div id="firebaseui-auth-container"></div>
> </ion-content>
];
} }
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (3 by maintainers)
Top GitHub Comments
I ended up with installing https://github.com/rollup/plugins/tree/master/packages/replace and using this stupid solution in my rollup plugins config:
I’m having this same issue with Rollup. I think the import in firebaseui is incorrect