Skip to content

Release builds fail on ARM Windows #16085

@shirakaba

Description

@shirakaba

Problem Description

A follow-up to #16084.

Even if I override the msbuild build props to use x64 Hermes on ARM Windows instead of x86 Hermes (by adding this build prop that sets release\x64\hermes.exe):

<HermesCompilerCommand Condition="'$(HermesCompilerCommand)' == ''">$(HermesPackage)\tools\native\release\x64\hermes.exe</HermesCompilerCommand>

... the build still fails:

 √ Found Solution: C:\Users\jamie\Downloads\MyApp123\windows\MyApp123.sln
 i Build configuration: Release
 i Build platform: ARM64
 × Building Solution: C:\Users\jamie\Downloads\MyApp123\node_modules\react-native-windows\PropertySheets\Bundle.C...
 × Build failed with message C:\Users\jamie\Downloads\MyApp123\node_modules\react-native-windows\PropertySheets\Bundle.Common.targets(22,5): error MSB3075: ???? "C:\Users\jamie\.nuget\packages\microsoft.javascript.hermes\0.0.0-2511.7001-d7ca19b3\tools\native\release\x64\hermes.exe -emit-binary -out "C:\Users\jamie\Downloads\MyApp123\windows\MyApp123\Bundle\index.windows.bundle.hbc" "C:\Users\jamie\Downloads\MyApp123\windows\MyApp123\Bundle\index.windows.bundle" -O -output-source-map" ???? 5 ???????????????????????????????????????? [C:\Users\jamie\Downloads\MyApp123\windows\MyApp123\MyApp123.vcxproj]. Check your build configuration.
 × It is possible your installation is missing required software dependencies. Dependencies can be automatically installed by running C:\Users\jamie\Downloads\MyApp123\node_modules\react-native-windows\scripts\rnw-dependencies.ps1 from an elevated PowerShell prompt.

As for the "It is possible your installation is missing required software dependencies" bit:

Set-ExecutionPolicy Unrestricted -Scope Process -Force;
C:\Users\jamie\Downloads\MyApp123\node_modules\react-native-windows\scripts\rnw-dependencies.ps1
Checking Free space on current drive > 15 GB                        OK
Checking Installed memory >= 16 GB                       Failed (warn)
Checking Windows version >= 10.0.17763.0                            OK
Checking Developer mode is on                                       OK
Checking Long path support is enabled                               OK
Checking Visual Studio 2022 (>= 17.11.0) & req. components          OK
Checking Node.js (LTS, >= 22.0)                                 Failed
Do you want to install? [y/N]: N
Checking Yarn                                                       OK
Checking .NET SDK (LTS, = 8.0)                                      OK
WARNING: Some dependencies are not met. Re-run with -Verbose for details, or use -Install to install them.

The only thing it found to be missing was Node.js. However, I do have Node.js LTS on path (it can be used directly from cmd.exe, Powershell, and gitbash), as rnc-cli info confirms, so I think the doctor command is just getting a false negative.

Steps To Reproduce

Create a new React Native Windows app and override the <HermesCompilerCommand> to use ARM Hermes, as described above.

Next, attempt a release build:

rnc-cli run-windows --arch=ARM64 --release

Expected Results

Release build should work.

CLI version

20.1.3

Environment

System:
  OS: Windows 11 10.0.26100
  CPU: (4) x64 Apple Silicon
  Memory: 1.87 GB / 7.99 GB
Binaries:
  Node:
    version: 22.20.0
    path: C:\Users\jamie\AppData\Local\Volta\tools\image\node\22.20.0\node.EXE
  Yarn:
    version: 1.22.22
    path: C:\Users\jamie\AppData\Local\Volta\tools\image\yarn\1.22.22\bin\yarn.CMD
  npm:
    version: 10.9.3
    path: C:\Users\jamie\AppData\Local\Volta\tools\image\node\22.20.0\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
  Windows SDK:
    AllowDevelopmentWithoutDevLicense: Enabled
    AllowAllTrustedApps: Enabled
    Versions:
      - 10.0.19041.0
      - 10.0.22621.0
IDEs:
  Android Studio: Not Found
  Visual Studio:
    - 17.11.35312.102 (Visual Studio Community 2022)
Languages:
  Java: Not Found
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli":
    installed: 20.1.3
    wanted: latest
  react:
    installed: 19.1.0
    wanted: 19.1.0
  react-native:
    installed: 0.81.5
    wanted: 0.81.5
  react-native-windows:
    installed: 0.81.15
    wanted: 0.81.15
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

info React Native v0.85.2 is now available (your project is running on v0.81.5).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.85.2
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.81.5&to=0.85.2
info For more info, check out "https://reactnative.dev/docs/upgrading?os=windows".

Community Modules

None

Target React Native Architecture

New Architecture (WinAppSDK) Only

Target Platform Version

None

Visual Studio Version

Visual Studio 2022

Build Configuration

Release

Snack, code example, screenshot, or link to a repository

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Triage 🔍New issue that needs to be reviewed by the issue management team (label applied by bot)bug

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions