create-react-app: [3,3.0] Unable to open browsers on WSL

Describe the bug

Open v7 has a bug on Windows and WSL. Given that many CRA user could be on Windows + WSL, I guess this is going to hit a lot of people soon. https://github.com/sindresorhus/open/issues/154

Related PR #7910 cc @andriijas as the one who sent PR to upgrade open from v6 to v7.

Did you try recovering your dependencies?

yes

Environment

OS: Linux 4.4 Node: 12.2.0 Yarn: 1.12.3 npm: 6.9.0 Watchman: 4.9.0 Xcode: N/A

I’m on WSL 1 though

Steps to reproduce

Only in windows/ WSL ecosystem

  1. Upgrade any CRA project to 3.3.0
  2. Run development server

Expected behavior

No error

Actual behavior

image

Reproducible demo

  1. git clone https://github.com/endiliey/rengorum.git
  2. cd frontend && yarn && yarn start

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 52
  • Comments: 22 (4 by maintainers)

Most upvoted comments

It is a bug with "react-scripts’: “3.3.0”. Switch to 3.2.0 by editing package.json file then running npm install. Worked for me.

It is a bug with "react-scripts’: “3.3.0”. Switch to 3.2.0 by editing package.json file then running npm install. Worked for me.

You’re a savior man. Thank you. I was struggling with this issue for last few weeks and had no idea the solution was this simple. It worked 👍👍

I can make a PR when they fix it in open. Try to pin open to 6.4.0 in your project package.json and see if that helps for now?

It is a bug with "react-scripts’: “3.3.0”. Switch to 3.2.0 by editing package.json file then running npm install. Worked for me.

Okay, guys. I found the bug itself. To leave react-scripts: 3.3.0, just go to node_modules -> open -> index.js and delete the target redefinition under the win32 || isWsl section of the code like this. Annotation 2020-01-20 142320