Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !6286

Fix error messages for child compilations

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/jamesknelson/child-errors into main Jan 27, 2019
  • Overview 6
  • Commits 1
  • Pipelines 0
  • Changes 4

Created by: jamesknelson

While working with an app that was ejected from create-react-app some time ago, I ran into an issue where the terminal was giving me the usual "Compiled successfully! You can now view cra in the browser." message, while actually opening the app in the browser was resulting in a "Cannot find /" message.

Further investigation showed that the Webpack compiler object's output filesystem object was empty, as if the build was failing. In fact, the build of a child compilation for a worker was failing, but react-dev-utils was not seeing this as formatWebpackMessages() only looks at jsonStats.errors, but ignores jsonStats.children[i].errors.

Updating formatWebpackMessages() to take child compilation errors into account solved the problem, with the "Compiled successfully!" message being replaced with the error that was causing compilation to fail.

Unfortunately, I've spent a couple hours trying to put together a simple reproduction that demonstrates the error outside of my old project, but have not been able to reproduce the error. I figure I should submit this anyway in case anybody else does find the error, as I lost most of the day to it. If nobody else is able to reproduce (and you don't merge it anyway), I'll try and spend a couple more hours on my own reproduction.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/jamesknelson/child-errors