-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Error building to production with ionic 3 and AngularFireDatabase #1970
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Could you at least format it correctly? With script tags and such? This isn’t really readable. |
Hello, sorry for the interspersed text. The problem is that it hangs on that line, if I use the AngularFireDatabase module. These are the packages that I am using. One solution that I found, was to make a downgrade of the Database version: npm install firebase angularfire2 --save in this way I was able to compile without problems. But the error would be in some version incompatibility. |
I have the same problema when I import the AngularFireDatabaseModule to my app.module.ts in ionic project. |
Had the same experience and this was quite jarring as you develop without For me the issue turned out to be the mere fact that I was importing the firebase package in my app (e.g. I've tried rolling-back several versions on both the So for now, as an alternative for the only function I need from the |
Someone knows a workaround to make it work? |
@jtpdev the solution I used won't do it for you? |
Well I'm using AngularFireDatabase to access the database, so I cannot remove the AngularFireDatabaseModule import. |
@jtpdev that actually wasn't my solution. Read above. |
Oh I think I understood... I'm going home now anda I'll tri do ti. |
@salmoro, If I understood right, the fix you found was to remove the import of firestone, correct? If so, I can not do it, because I do not have this import in the code anywhere :( My imports are:
And in my package json I have:
Any idea? |
@jtpdev |
I try remove firebase import and remove it of my package.json as well. But now don't build 'cause the @angular/fire didn't find the firebase/app
|
Remove all imports from |
I removed all imports from firebase, the problem above occurs inside the @angular/fire 😥 I'll wait... |
I am using [email protected] and AngularFire 5.1.1 with [email protected], and I am facing the same issue as you @jtpdev. It is impossible to build the ionic project with the --prod flag. The build process freezes at the same step you mentioned. I tried many workarounds and downgrading "@firebase/database" to 0.2.1 (instead of the 0.3.8 version which ship with [email protected]) was the only solution which worked for me.
However I am not sure it is a robust solution for shipping an app in production. Any more recent version (from 0.2.2) will cause the same problem. I found this solution thanks to @JNSantiago on this issue. The same problem seems to be discussed on the ionic repo here. |
@nilebma it works perfectly. Thanks a lot. |
Seems like this was addressed. |
Hello,
i'm trying to build to production an ionic application but when i try to run the command line is stopped forever.
cli packages: (C:\Users\Javier\AppData\Roaming\npm\node_modules)
global packages:
local packages:
System:
My Package:
"@angular/fire": "^5.1.1",
"angularfire2": "^5.1.1",
My app.module:
import { AngularFireModule } from '@angular/fire';
import { AngularFireDatabaseModule, AngularFireDatabase } from '@angular/fire/database';
import { AngularFireAuthModule } from '@angular/fire/auth';
when i run the command:
Running app-scripts build: --prod --platform android --target cordova
[11:45:04] build prod started ...
[11:45:04] clean started ...
[11:45:04] clean finished in 3 ms
[11:45:04] copy started ...
[11:45:04] deeplinks started ...
[11:45:05] deeplinks finished in 432 ms
[11:45:05] ngc started ...
[11:45:19] ngc finished in 14.78 s
[11:45:19] preprocess started ...
[11:45:19] preprocess finished in 1 ms
[11:45:19] webpack started ...
[11:45:20] copy finished in 15.78 s
stop forever in that line "copy finished in..."
Can you help me with that?
thanks.
The text was updated successfully, but these errors were encountered: