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
  • Issues
  • #12992
Closed
Open
Issue created Jan 27, 2023 by Administrator@rootContributor

Build hashes vary based on order of REACT_APP_ keys in process.env

Created by: jgregory-apogee

Describe the bug

In some build environments (like Kubernetes), the order of the keys in process.env is non-deterministic. This can result in build outputs from the same source code and environment that have different hashes due to arbitrary variations in the order of the included REACT_APP_* variables.

Reproducible demo

See the repo at: https://github.com/apogee-stealth/cra-env-test

You can run the script test-env-order.sh in that repo to reproduce the issue.

The fix is simply to sort the REACT_APP_* keys before injecting them into the build. I will open a PR shortly with that change.

Assignee
Assign to
Time tracking