Skip to content

Latest commit

 

History

History
73 lines (57 loc) · 4.02 KB

rnw-dependencies.md

File metadata and controls

73 lines (57 loc) · 4.02 KB
id title
rnw-dependencies
System Requirements

You can only develop React Native for Windows app on Windows. You can run React Native for Windows apps only on:

  • All Windows 11 devices
  • Windows 10 devices with Windows version: 10.0.16299.0 (aka 1709, aka Redstone 3, aka Fall Creators Update) or higher Some features may not work on all versions. See Windows 10 Compatibility for version support details.

To develop React-Native for Windows apps, you need to install several dependencies.

Install the development dependencies

To check or install dependencies, run the script rnw-dependencies.ps1 in an elevated PowerShell window.

Run this command: Start an elevated PowerShell window and run:

Set-ExecutionPolicy Unrestricted -Scope Process -Force;
iex (New-Object System.Net.WebClient).DownloadString('https://aka.ms/rnw-vs2022-deps.ps1');
Manual setup instructions

The recommended way is to use the script above as the information in this manual section is likely to get out of date

Alternatively, you can setup your environment manually:

  • Ensure Developer Mode is turned ON in Windows Settings App.
  • It is highly recommended to update the Windows system.
  • Install the latest version of Visual Studio 2022 with the following options checked:
    • Workloads
      • Node.js development, or one of the following alternatives:
        • Install from Individual Components:
          • Development activities
            • Node.js development support
        • Install Node.js separately, see below for some options
      • .NET Desktop development
      • Desktop development with C++
        • Include MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest) (check under 'Optional')
      • Universal Windows Platform development
        • Include C++ (v143) Universal Windows Platform tools (check under 'Optional')
    • Individual Components
      • Include Windows 10 SDK (10.0.19041.0) (target OS version from this table)
      • Include MSVC v143 - VS 2022 C++ ARM64 build tools (Latest) (to target ARM64 devices)
  • Enable Long Paths in Windows 10, Version 1607, and Later.
  • Install the latest version of the .NET 6.0 SDK.

Options to install Node.js separately:

  • Using Chocolatey (React Native recommended). To use chocolatey, from an elevated Command Prompt, run:
choco install nodejs-lts

Optional steps that are highly recommended:

Troubleshooting

  • If after running the app, the packager does not update (or) app does not show React Native content - close the packager command prompt window and the app, make sure browser is open, run yarn start and run the app from Visual Studio again.
  • If you get a red error box in your UWP app window with the error message : ERROR: Instance failed to start. A connection with the server cannot be established, make sure you have the packager running using yarn start and run the app again.