Can't resolve firebase and firebaseui while building with AOT
See original GitHub issue[REQUIRED] Describe your environment
- Operating System version: Ubuntu 18.04.1 LTS
- Browser version: Chrome 69.0.3497.81
- Firebase UI version: 3.4.0
- Firebase SDK version: 5.4.2
[REQUIRED] Describe the problem
While building a project with AOT. The modules can’t be resolved.
ERROR in ./src/app/app.module.ngfactory.js
Module not found: Error: Can't resolve 'firebase/index' in '/home/Projects/GitHub/FirebaseUI-Angular/src/app'
ERROR in ./src/app/app.module.ngfactory.js
Module not found: Error: Can't resolve 'firebaseui/dist/index' in '/home/Projects/GitHub/FirebaseUI-Angular/src/app'
Steps to reproduce:
Run the demo project of FirebaseUI-Angular with ng build --prod
Relevant Code:
src/app/app.module.ts
import * as firebase from 'firebase/app';
import * as firebaseui from 'firebaseui';
const firebaseUiAuthConfig: firebaseui.auth.Config = {
signInFlow: 'popup',
signInOptions: [
firebase.auth.GoogleAuthProvider.PROVIDER_ID,
{
scopes: [
'public_profile',
'email',
'user_likes',
'user_friends'
],
customParameters: {
'auth_type': 'reauthenticate'
},
provider: firebase.auth.FacebookAuthProvider.PROVIDER_ID
},
firebase.auth.TwitterAuthProvider.PROVIDER_ID,
firebase.auth.GithubAuthProvider.PROVIDER_ID,
{
requireDisplayName: false,
provider: firebase.auth.EmailAuthProvider.PROVIDER_ID
},
firebase.auth.PhoneAuthProvider.PROVIDER_ID,
firebaseui.auth.AnonymousAuthProvider.PROVIDER_ID
],
tosUrl: '<your-tos-link>',
privacyPolicyUrl: '<your-privacyPolicyUrl-link>',
credentialHelper: firebaseui.auth.CredentialHelper.ACCOUNT_CHOOSER_COM
};
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:14 (3 by maintainers)
Top Results From Across the Web
How to resolve Firebase could not find firebase-auth-icense ...
Tried fixing it with many things like updating sdk build tools, google play services etc but still getting same error. Following is my...
Read more >Module not found: Can't resolve 'firebase' | bobbyhadz
To solve the error "Module not found: Error: Can't resolve 'firebase'", make sure to install the firebase package by opening your terminal in...
Read more >Release Notes | Firebase - Google
The Firebase SDK for Unity (v8.10.1) is now available. This release fixes an issue when building with mainTemplate.gradle.
Read more >The Ultimate Guide To Firebase With Next.JS - Jarrod Watts
Learn How To Set Up Firebase With Next JS And Create A Cloud Firestore Database, GitHub Authentication, and Firebase Cloud Functions in Next ......
Read more >Easily Add Firebase Auth to React - YouTube
Let's add Firebase Auth to a React app (Next.js) to keep those unsavoury characters out! We will create a custom AuthProvider to track...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@RaphaelJenni Getting this error now since angular 8.0.0. even with the exposed libraries.
Here’s the fix:
// currently there is a bug while building the app with --prod // - https://github.com/RaphaelJenni/FirebaseUI-Angular/issues/76 // the plugin exposes the two libraries as well. You can use those: import { FirebaseUIModule, firebase, firebaseui } from ‘firebaseui-angular’;