Skip to content

Failed to minify the bundle. Error: static/js/2.2c2ccbd8.chunk.js from Terser #12899

@minnat65

Description

@minnat65

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.
image

It was working fine for last week but now its build is failing.
I am using NODE_OPTIONS=--max_old_space_size=4096 memory.
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?)
image

Without Lazy loading biggest chunks size is around 4.8 MB. (First I splitted the code based on route then deployed, Initial 6-7 deployment was successfull then it started failing. Once I tried many solutions none of them worked then I remove the code splitt logic and deployed again but it giving the same error.).

Tried multiple solutions available in #8320

Temporarily it is working when I set GENERATE_SOURCEMAP=false in .env file.
Node Version: 12.19.0
"react: ^16.13.1",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions