0

I am working on a simple react project on Windows 10 Pro. On trying to run the project with wsl with zsh (npm start) everything works, I get warnings and compilation is done without any errors. The issue I am facing is automatic launch of browser from wsl is not happening. If I manually open localhost:3000 on my chrome after this command everything works but I would like the wsl terminal to launch my browser on npm start automatically just like it does in most of my other terminals and powershell on windows.

What I have tried:

  1. added a export browser property to my .zshrc with path to chrome from here
  2. Added a bsconfig file to root with following code to set open = true as per from here
  3. I have added the ports from 3000-3999 to my firewall so that wsl can access my host (localhost ip). this fixed previous issue where localhost:3000 would show connection refused error.

I would be happy to provide any more details. I am very new to wsl and zsh and I would really appreciate any help. Thanks

  • 1
    Sounds like it could be related to [this](https://github.com/facebook/create-react-app/issues/8081). What version of the `open` package is being used? – NotTheDr01ds Feb 11 '21 at 21:31
  • @NotTheDr01ds Thanks! I used create-react-app to initialize my project. My simple project doesn't have dependency on "open". But as I used create-react-app and it needs open, I am not sure how do I go about changing the open version now. It is set to 7.4.0 as per my package.lock.json file. they also seem to have fixed this issue in open 7.0.2 as per the comments but I am not sure. If you know how to safely downgrade the open version to 6.4.0 please let me know! Thanks – Akash Deodhar Feb 14 '21 at 00:48

0 Answers0