Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiling React Native for Windows (on Windows)

Has anyone successfully compiled and run a Windows (UWP) app on a Windows (10) machine using React Native?

I've built an app, it's working in the Android emulator. I ran through the instructions from Microsoft here and here.

I am using VS Code for my editor... should I be using Visual Studio?

I ran these commands to convert existing project to a 'Windows' project which adds the Windows file structure. That works.

npm install --save-dev rnpm-plugin-windows
react-native windows

I ran:

react-native run-windows

Which basically works but fails at the end.

At this point in the loading I get an error:

Building C:/Users/..../MyApp/windows/MyApp.sln
ERROR: The system was unable to find the specified registry key or value.

The rest of it seems to install fine but at the end...

Press Enter to continue...:
Failed to deploy: Command failed: CheckNetIsolation LoopbackExempt -a -n=

I Googled this error and got literally zero results. Anyone have something that could help me get over this hump?

Am I supposed to have a Windows Emulator on my machine like the Android emulator or does it just run like any other program?

Also, I'm not 'allowed' to create a new tag unless I have 1500 magic unicorn points so could someone please create react-native-windows tag for future users?

like image 251
GenericJam Avatar asked Feb 21 '26 00:02

GenericJam


1 Answers

Solution:

CheckNetIsolation LoopbackExempt -a -n=MyApp

Where 'MyApp' is the name of your project folder.

Thanks @Onorio Catenacci for the link that had the clues to put it together.

like image 112
GenericJam Avatar answered Feb 24 '26 02:02

GenericJam