I set up a react native windows app following these set up instructions: https://learn.microsoft.com/en-us/windows/dev-environment/javascript/react-native-for-windows. I've installed all of the dependencies and checked that they're installed by running this command in an elevated powershell:
Set-ExecutionPolicy Unrestricted -Scope Process -Force;
iex (New-Object System.Net.WebClient).DownloadString('https://aka.ms/rnw-vs2022-deps.ps1');
But when I run
npx react-native run-windows
in my VS Code terminal at the root of the project, I keep getting this error
Build failed with message 7:7>LINK : fatal error LNK1104: cannot open file 'msvcprtd.lib' [C:\Users\SarahCarter\Documents\Apps\test\node_modules\react-native-windows\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj]. Check your build configuration.
I get the same error when I follow the directions to run my app from Visual Studio. I didn't make any changes to the app after following the get started instructions, so it must be an issue with the set up.
Also of note, I have Windows Version 10.0.22621 Build 22621, which is compatible with react native windows according to the system requirements here https://microsoft.github.io/react-native-windows/docs/rnw-dependencies
What is the msvcprtd.lib file and how do I fix this error?
Thanks in advance!