microsoft / react-native-windows

A framework for building native Windows apps with React.
https://microsoft.github.io/react-native-windows/
Other
16.26k stars 1.14k forks source link

System Requirements Script Didn't Work #13882

Open stmoy opened 1 week ago

stmoy commented 1 week ago

Problem Description

I ran the script: https://microsoft.github.io/react-native-windows/docs/rnw-dependencies#install-the-development-dependencies on a totally fresh machine (incl. no VS installed). It didn't work -- every step after attempting to install VS through Node.js, Yarn, and .NET SDK failed.

I suspect the issue was that the VS installation didn't complete which caused the other dependencies to fail. Once I manually finished installing Visual Studio, the other dependencies were installed successfully.

Steps To Reproduce

  1. On a fresh computer, run the scripts located here: https://microsoft.github.io/react-native-windows/docs/rnw-dependencies#install-the-development-dependencies

A few other notes:

  1. For non-installation dependencies (ie. Developer mode, long path support), it's a bit confusing that the script prompts "do you want to install?" -- it should probably state "do you want to turn on Developer Mode"
  2. The script suggest running with flags -debug or -verbose, but it's unclear how to do that when the command is: iex (New-Object System.Net.WebClient).DownloadString('https://aka.ms/rnw-vs2022-deps.ps1'); Attempting to do iex (New-Object System.Net.WebClient).DownloadString('https://aka.ms/rnw-vs2022-deps.ps1 -verbose'); did not work.

Expected Results

  1. Dependencies are installed correctly

CLI version

N/A

Environment

Admin powershell

Community Modules

No response

Target Platform Version

None

Target Device(s)

No response

Visual Studio Version

None

Build Configuration

None

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

No response

microsoft-github-policy-service[bot] commented 4 days ago

This issue lacks the environment info requested in the bug template. Please edit your issue report to add this information.

If you are using latest version:

  1. npx @react-native-community/cli --version:
  2. npx @react-native-community/cli run-windows --info:

Otherwise if --info doesn't exist:

  1. npx @react-native-community/cli -v:
  2. npm ls rnpm-plugin-windows:
  3. npm ls react-native-windows:
  4. node -v:
  5. npm -v:
  6. yarn --version:
chrisglein commented 4 days ago

Do you have the error message from when it failed the first time? Since you manually installed I'm guessing that the debug/verbose log won't help at this point.

chrisglein commented 4 days ago

We should add clarification to the docs on this:

The script suggest running with flags -debug or -verbose, but it's unclear how to do that when the command is: iex (New-Object System.Net.WebClient).DownloadString('https://aka.ms/rnw-vs2022-deps.ps1'); Attempting to do iex (New-Object System.Net.WebClient).DownloadString('https://aka.ms/rnw-vs2022-deps.ps1 -verbose'); did not work.