react icon indicating copy to clipboard operation
react copied to clipboard

Bug: The UMD builds for react and react-dom are not building correctly

Open deepak427 opened this issue 5 months ago • 8 comments

React version: 19.2.0

Steps To Reproduce

  1. Clone the latest project from React Github.
  2. Run yarn to install dependencies.
  3. Run yarn build react/index,react-dom/index --type=UMD.
Image

The current behavior

I did not get the expected build output. According to the documentation, the build folder should contain UMD files that are referenced in fixtures/packaging/babel-standalone/dev.html, but after inspecting that file, I noticed that the paths and files mentioned there were not generated during the build.

Image

The expected behavior

The build folder should contain a UMD folder, where the UMD development files should reside.

deepak427 avatar Jul 16 '25 05:07 deepak427

Hi! I'm Rahul, and I'm new to open source. I have an intermediate-level understanding of building React applications, and I'm really interested in contributing to the React core project—not just fixing documentation or picking "good first issues," but actually learning how to solve deeper bugs or feature requests.

Could anyone guide me on how to start acquiring the knowledge required to understand and work on these types of issues? I’m happy to invest time learning React internals if someone can point me in the right direction (files, concepts, resources, etc.).

Thanks in advance—I’m excited to contribute!

therahulbehera avatar Jul 16 '25 09:07 therahulbehera

https://github.com/facebook/react/pull/28735

hidaviddong avatar Jul 16 '25 14:07 hidaviddong

Thanks. But using yarn build react/index,react-dom/index --type=NODE or just yarn build react/index,react-dom/index still doesn't create builds for React. There is no node_modules folder, nor is there a react folder.

deepak427 avatar Jul 16 '25 15:07 deepak427

Hi! 👋 Thanks for reporting this issue.

I looked into it and here's what you can try:

  1. After cloning and running yarn install, make sure to also run:
   ```bash
   yarn setup

This step is required to properly configure the monorepo.

  1. Then, try running the build with the stable channel explicitly:

yarn build react/index,react-dom/index --type=UMD --channels=stable

This should generate the expected UMD files in:

build/react/umd/react.development.js
build/react-dom/umd/react-dom.development.js

If the issue still persists, try:

yarn build --type=UMD --channels=stable

Let me know if that helps or if you still run into problems. Happy to assist further!

aelric1 avatar Jul 16 '25 21:07 aelric1

Hey, thanks. I tried the steps you provided, but there's no yarn setup script in this project, so I'm getting an error. The other two commands are generating the same build folder as before.

Image

deepak427 avatar Jul 17 '25 15:07 deepak427

This problem is trouble me,too.Do have any method to resolve it now?

ounstoppableo avatar Jul 23 '25 10:07 ounstoppableo

Hi @deepak427 UMD is removed in latest version of ReactJS.

Try with yarn build - This will build for the packages along with channels like experimental, stable, etc. Also try with yarn build-for-devtools-dev yarn build-for-devtools-prod see if it works for you. It should create build folder with sub directories like oss-experimental react, react-dom etc...

snehalhumne avatar Sep 01 '25 11:09 snehalhumne

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

github-actions[bot] avatar Dec 01 '25 18:12 github-actions[bot]

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!

github-actions[bot] avatar Dec 08 '25 18:12 github-actions[bot]