0

I have a project in CRA. I am using Windows 10 and my default browser is Firefox. I would like my project to start with the Microsoft Edge browser and not with Firefox. I have used a line like this in the package.json script to open with Chrome and it works:

"start: react": "cross-env BROWSER = chrome react-scripts start",

But if I put this for Edge it doesn't work for me:

"start: react": "cross-env BROWSER = edge react-scripts start",

Is there a way to make it work?

2
  • Re "I have a project in CRA": Do you mean "I have created a project using CRA"? (Create React App). (Not a rhetorical question.) Commented Sep 5, 2021 at 13:54
  • That's what I meant. I see that you have also understood Commented Sep 5, 2021 at 20:52

1 Answer 1

1

Problem solved: The detail was that I placed the script line in the following way using the browser name "edge":

"start: react": "cross-env BROWSER = edge react-scripts start",

But the name of the browser is "msedge". In this way the script line looks like this:

"start: react": "cross-env BROWSER = msedge react-scripts start",

This way it works properly.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.