Bug: The UMD builds for react and react-dom are not building correctly
React version: 19.2.0
Steps To Reproduce
- Clone the latest project from React Github.
- Run
yarnto install dependencies. - Run
yarn build react/index,react-dom/index --type=UMD.
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.
The expected behavior
The build folder should contain a UMD folder, where the UMD development files should reside.
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!
https://github.com/facebook/react/pull/28735
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.
Hi! 👋 Thanks for reporting this issue.
I looked into it and here's what you can try:
- After cloning and running
yarn install, make sure to also run:
```bash
yarn setup
This step is required to properly configure the monorepo.
- 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!
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.
This problem is trouble me,too.Do have any method to resolve it now?
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...
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!
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!