Skip to content

Fix build-from-source on Windows: use JVM temp dir instead of hardcoded /tmp - #57706

Open
kraenhansen wants to merge 1 commit into
react:mainfrom
kraenhansen:claude/build-from-source-windows-tmpdir-h2a45h
Open

Fix build-from-source on Windows: use JVM temp dir instead of hardcoded /tmp#57706
kraenhansen wants to merge 1 commit into
react:mainfrom
kraenhansen:claude/build-from-source-windows-tmpdir-h2a45h

Conversation

@kraenhansen

@kraenhansen kraenhansen commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

packages/react-native/settings.gradle.kts declares the intermediate container projects :packages and :packages:react-native with projectDir = file("/tmp"), to satisfy Gradle 9's requirement that every project in a path have an existing folder. /tmp exists on posix hosts, but on Windows it is not an absolute path, so Gradle resolves it to a non-existent <rootDir>\tmp and build-from-source fails at configuration time:

Configuring project ':packages:react-native' without an existing directory
is not allowed.

Use System.getProperty("java.io.tmpdir", "/tmp") instead — the JVM temp dir, which is /tmp on posix and %TEMP% on Windows, and always exists.

Changelog:

[ANDROID] [FIXED] - Use the JVM temp dir instead of a hardcoded /tmp for the build-from-source container project dirs, fixing Gradle configuration on Windows

Test Plan

…ed /tmp

The intermediate container projects :packages and :packages:react-native
are declared with projectDir = file("/tmp") to satisfy Gradle 9's
requirement that every project in a path have an existing folder. "/tmp"
is not an absolute path on Windows, so Gradle resolves it to a
non-existing <rootDir>\tmp and build-from-source fails at configuration
time. Use the JVM temp dir instead, which exists on every platform.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F7Mx2sWYCbJMwyTXaiXjbQ
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 27, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jul 27, 2026
@meta-codesync

meta-codesync Bot commented Jul 27, 2026

Copy link
Copy Markdown

@Abbondanzo has imported this pull request. If you are a Meta employee, you can view this in D113816859.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant