angular / angularfire

Angular + Firebase = ❤️
https://firebaseopensource.com/projects/angular/angularfire2
MIT License
7.64k stars 2.2k forks source link

Production build freezes using 16GB+ of RAM and all CPU #2091

Closed isum closed 3 years ago

isum commented 5 years ago

Version info

Angular: 8

Firebase: 6.1.0

AngularFire: 5.2.0-rc.3

OS: MacOS Mojave 10.14.5

Node: 12.3.1

How to reproduce these conditions

Steps to set up and reproduce

  1. Create a new Angular app using ng new app;
  2. Run ng add @angular/fire@next or npm i firebase @angular/fire --save or npm i firebase @angular/fire@next --save;
  3. Use AngularFireModule.initializeApp(environment.firebase) in app.module.ts
  4. Run ng build --prod;

Debug output

Errors in the JavaScript console

No errors, just freezes.

Expected behavior

To create production build.

Actual behavior

Freezes and uses all available resources of the machine where it runs.

Additional info

The build process freezes right after the "modern build" of the app. If I disable default "modern build" in tsconfig with "target": "es5", then it builds successfully, but this is not the expected behaviour.

Also, if I remove AngularFireModule everything builds just fine.

mwawrusch commented 5 years ago

Try something like this: node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build .......

wingo7 commented 4 years ago

Does that happen for Ionic? I have the same issue with ionic

jamesdaniels commented 3 years ago

Closing as outdated.