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
  • !12292

fix: webpack hanging under certain circumstance, use process.exitCode…

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Administrator requested to merge github/fork/alexxyzeng/main into main Apr 14, 2022
  • Overview 3
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: alexxyzeng

sometimes i found out react-scripts buld hangs under certain circumstances, like: 81ae142a7d27fafa6e422f0f81b49f2 when i changed process.exit(1) to process.exitCode = 1, it can end up with failure: 3ee6070794b767f955ca547ec3270fb

According to https://nodejs.org/dist/latest-v16.x/docs/api/process.html#processexitcode_1:

Rather than calling process.exit() directly, the code should set the process.exitCode and allow the process to exit naturally by avoiding scheduling any additional work for the event loop:

I also find that webpack and webpack-cli also have simlar issues fixed: fix: fix webpack hanging under certain circumstance Fix webpack hanging under certain circumstance, use process.exitCode instead of process.exit in compilerCallback misc(refactor): reduce code duplication use process.exitCode instead of process.exit

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/alexxyzeng/main