Angular API fatal error handler returned after process out of memory

Kenana Reda picture Kenana Reda · Nov 20, 2018 · Viewed 7.5k times · Source

I'm deploying angular 7 app to Azure, an error

API fatal error handler returned after process out of memory

is appear when run ng build --prod even in local system when running ng build --prod no error found except some warning

WARNING in Invalid background value at 9045:14. Ignoring. WARNING in Invalid background value at 9064:14. Ignoring. WARNING in Invalid background value at 9067:14. Ignoring. WARNING in Invalid background value at 9070:14. Ignoring. WARNING in Invalid background value at 9073:14. Ignoring. WARNING in Invalid background value at 11642:14. Ignoring.

here is the log Activity log

here is package.json

package.json

Thanks in advance!

Answer

freepowder picture freepowder · Nov 20, 2018

Looks like you need more gb memory to compile the project in wherever that ng build happens. Either increase memory, or do the ng build in your local, and commit the dist, then in Azure you just deploy with no build step.

ng build --prod --build-optimizer