0

When I am trying to deploy my react app on AWS Amplify I am getting below error. We are using Amplify for last 2 years. enter image description here

It was working fine till last week but now its build is failing. I am using NODE_OPTIONS=--max_old_space_size=4096 in build command. This project is quite big.

With code splitting biggest chunk size is 2.2 MB but number of chunk is around 100.(Is it right to have so many chunks?) enter image description here

Without Lazy loading biggest chunks size is around 4.8 MB(Refer below). enter image description here

Using Node Version: 12.19.0 & "react: ^16.13.1"

First I splitted the code based on route then deployed, Initially 6-7 deployment was successfull then it started failing. Then I tried many solutions from this github issue, but none of them worked then I remove the code split logic and deployed again but it was giving the same error.

Temporarily it is working when I set GENERATE_SOURCEMAP=false in .env file. But I think this is not a permanent solutions. Above solutions is only disabling the source-map.

Minnat Ali
  • 11
  • 2

0 Answers0