DEV Community

Cover image for Expo QR code on Windows Subsystem for Linux (WSL2)

Expo QR code on Windows Subsystem for Linux (WSL2)

Alecell on March 05, 2024

Prerequisites: Windows 11/10 WSL2 NodeJS Admin Rights Up to Date Power Shell Version Dotenv On one of the Top Secret project on Devhat commu...
Collapse
 
victordas profile image
Victor
  1. On Powershell (Admin):
    netsh interface portproxy add v4tov4 listenport=8081 listenaddress=<HOST_IP> connectport=8081 connectaddress=<WSL_IP>

  2. On WSL
    REACT_NATIVE_PACKAGER_HOSTNAME=0.0.0.0 npm run android

Solved it for me

Collapse
 
andresnb profile image
Andres

Man, I can't believe I will be first comment. I was on my own quest to solving this. You helped me with the final script to make it as smooth as possible.

I will add it to my blog with the due credits!! This post needs all the attention possible for developing in expo with Windows. I need to buy you a beer!

Cheers mate!

Collapse
 
gurkiratz profile image
Gurkirat

Man, you are the saviors of saviors. I appreciate your guidance through the bottom of my heart xoxo

Collapse
 
thanksboss profile image
Andrew K

Legend, nothing from Stack Overflow worked, thank you so much

Collapse
 
luisfalconmx profile image
Luis Falcon

Thank you so much. This is the best tutorial about how to setup wsl2 with react native.
You're the best!!!

Collapse
 
sintuitt profile image
Sincere Tuitt

ay bro, I think I love you

Collapse
 
solo_solo_792f6112cd3d2 profile image
Solo “Solo”

Probably the most straight forward tutorial on how to work Expo with WSL! You just save me a ton of time mate! Thank you for this!

Collapse
 
antoniocardim profile image
António Cardim

You saved my life, thank you!!!

Collapse
 
quentinmousset profile image
Quentin Mousset

Man you save me hours of investigation, I'm registering on dev.to just to tell you : THANK YOU !

Collapse
 
clment_oliva_01812cca3cc profile image
Clément Oliva

BEST ARTICLE EVER !
And thanks a lot

Collapse
 
george_chalikiopoulos_a2d profile image
George Chalikiopoulos

Logged in just to say thank you