0

I'm trying to build a project for production using ng build --prod. Everything goes OK on the build, but when I try to open it on the browser it takes some time in a main-es2015 bundle parsing and returns me the following error:

ERROR in Maximum call stack size exceeded

I tried to debug via error stack trace but didn't get any luck on this.

I think that may have an infinite loop over my code, but don't know where. I'm using lazy-loaded routes and Material Angular. At first I thought about possible circular dependencies and I've unified only one of these dependencies among the modules (MatButtonModule) in order to test and it didn't worked (the MatButtonComponent wasn't being parsed).

Someone could help me to understand what may happened here?

Hugo Deiró
  • 224
  • 2
  • 13

1 Answers1

0

I faced exactly the same issue when working in the Production environment. If you used Docker container like I did, it has a default size of 500MBs. Ask the devOps team to increase the docker size. It is basically because your docker image size is much greater than 500MBs, mine was 1.7GBs. It usually happens if in the docker image we do not use Alpine distribution.

Also, if you have access to the logs, please check the docker server logs and it is definitely the issue with the docker image size being greater than docker container size

Dharman
  • 30,962
  • 25
  • 85
  • 135
Bitly
  • 728
  • 2
  • 11
  • 22