-
Notifications
You must be signed in to change notification settings - Fork 303
ionic build --prod gets stuck after copying because of @firebase/app #1422
Comments
It seems the reported issue had nothing to do with The real culprit was having the Ionic project depend on
|
@westphalen how did you manage to get rid of the |
If you depend on it directly, I have no idea. It was just in my project to support After upgrading everything, and then downgrading Reason for the downgrade: angular/angularfire#1576 |
related to firebase/firebase-js-sdk#904 |
Unfortunately, I can not downgrade to |
@tahminabs23 Have you tried with angularfire2 5.0.0-rc-7.0? |
@westphalen yes, I tried with |
Now I tried with |
@westphalen thank bro it works for me ...! firebase@4.12.1 💯 💯 💯 💯 💯 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 thanks dude ... |
Yes, downgrade to firebase@4.12.1. Thank you @westphalen |
Hello, Please remove www folder,node modules,platforms, and npm install please note : I have updated to ionic 4 and cordova 8. this solved my issue. |
After copy, webpack finished command is not displayed and freezes terminal. I m using FCM push notification and I'm facing a similar issue. Any solutions? I have tried these three solutions : https://forum.ionicframework.com/t/ionic-build-prod-stuck-at-copy-finished-in/129732/11 project property : target=android-25 |
If anyone using firbase@5.4.2 and occurs the problem, downgrade to 5.4.1 works for me. |
Unfortunately, i get the following error from angularfire2
I also downgraded to angularfire2 5.0.0-rc.7 and get "Zone already loaded" error which doesn't allow my app to run, i also had to change some calls for fireAuth.user... |
Update: See my latest comment, it works better than this solution. Ok, thanks to @tahminabs23 i managed to find a solution. This combination is working fine for me at the moment.
I had to change some code for the Auth validation: From:
To
|
The combination of these 2 versions solved the issue for me: firebase - 4.12.1
|
@saumya04 Is that combination working? I get this warning: npm WARN angularfire2@5.0.0-rc.4 requires a peer of firebase@^4.5.0 but none is installed |
@WooWapDaBug Yup the combination is working for me... |
@saumya04 You are right, now it is working. I don't know what I was doing wrong |
I have to tell that this is not the best solution. The best solution is to stop using the old angularfire2 namespace and switch to latest firebase, @angular/fire (this one instead of angularfire2) releases . At some point if you need offline usage you will have to try angularfire2-offline and that package is no longer mantained, so you will maybe want to try firestore, which is not supported in the angularfire2@5.0.0-rc4, firebase@4.5.0 combination. My fix (which i think is the best for this specific scenario) was to update to latest @angular/fire and firebase and update all my imports... I also remember having some issues with the rxjs compat package but those are gone now. My current working packages.json dependencies look like this:
You have to uninstall angularfire2 and firebase and reinstall with That solution worked for me and now i enjoy the latest features and firestore support with offline usage. |
@kevinrodriguez-io FWIW I have this issue occur without any library other than |
Where did you change it to 4.12.1? |
@kevinrodriguez-io when you did this, your project stopped hanging when you used the production flag? |
@westphalen what version of angularfire2 are you using? |
Finally it worked for me, i downgraded my @ionic/app-scripts to 3.1.11 and also added @firebase/database@0.2.1. These two links really helped me out: |
@courageDeveloper what did your package.json ultimately look like? I'm running into this issue now. Did you install |
I was able to get it (like most people it seems...) after trying a bunch of different solutions. For me, the key seemed to be installing Here are the important parts of my {
"dependencies": {
"@angular-devkit/build-optimizer": "0.6.8",
"@angular/fire": "^5.1.1",
"firebase": "^5.7.1",
"rxjs": "^6.0",
"rxjs-compat": "^6.3.3"
},
"devDependencies": {
"@ionic/app-scripts": "3.1.11"
}
} |
i am not using firebase but copy finished after freeze here this package.json any remove or update please reply as soon as...
}, |
adding @angular-devkit/build-optimizer as @mattdodge mentioned solved this for me. Thx. |
I don't know what kind of black magic this does, but it fixed a couple of projects with the same problem but with no firebase 😄 |
Tons of errors came up after installing this plugin:
Ionic config:
Plugins:
|
This simple temporary solution Your Project folder open vs code find main.js.map and open delete content then save after run ionic prod build all issues are solved |
I can't find this file |
ok no problem, its place of the file here project_path/.source_maps/main.js.map |
Short description of the problem:
There seems to have been some issues running
ionic build --prod
with certain version of@ionic/app-scripts
and webpack back in late 2017, but I'm experiencing this issue with a new project on latest versions in 2018.Specifically, the build process gets stuck right after
copy finished
. Eventually (about half an hour with default settings) it will exhaust memory and crash.The reason this started happening for me was
firebase init functions
creating afunctions
directory in my project. This should be ok, but for some reason Webpack picks it up for myionic build --prod
and goes amok.What behavior are you expecting?
functions
directory is unrelated and thus ignored by app-scripts.Steps to reproduce:
firebase init functions
ionic build --prod
Which @ionic/app-scripts version are you using?
3.1.9
Other information:
Either webpack should not touch any files not related specifically to the Ionic project, or we should be able to configure the scope somehow.
The text was updated successfully, but these errors were encountered: