Skip to content

[email protected] takes forever to build #5068

Closed
@lamngo255

Description

@lamngo255

Recently, I upgraded a CRA project to the latest react-scripts v2 release (2.0.0-next.2150693d), and quickly realized that "yarn build" takes hours to build my project. Seems like it hangs at "Creating an optimized production build" for some reasons. That was quite unexpected since the previous version of react-scripts that I used (v1.1.5) could build the project just fine, though production build took a fairly long time (~15min).

FYI, before I was able to build, I had to manually update eslint to version 5.6.0, because react-scripts v2 requires it and a different version of eslint (3.9.1) detected higher up in the tree isn't compatible with [email protected], sorta similar to this known issue. I guess this approach could prevent users from breaking react-scripts initial dev dependency? (link).

Environment

  1. node -v: v8.12.0
  2. npm -v: v6.4.1
  3. yarn -v: (if you use Yarn): v1.9.4
  4. react-scripts: (if you haven’t ejected): 2.0.0-next.2150693d
  5. Ubuntu 16.04 LTS

Expected Behavior

yarn build succeeds

Actual Behavior

Get stuck at "Creating an optimized production build..." forever.

Reproducible Demo

Here's my package.json

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions