Open duritia opened 3 years ago
Hi, this sounds way to specific for us to look at. The BROWSER
parameter for npm start
might also be specific to CRA
, or the package they are using for opening the project in a browser after build. You'll probably have to take a look at the docs for webpack-dev-server
to solve this. You can just go to localhost:3000
in your chosen browser as well, since npm start
just hosts a server locally on that port. The browser it automatically opens it up in doesn't really matter, it's just so you doesn't need to write localhost:3000
into your browser manually.
theres no json file
The default browser i use is a very limited one, for a personal choice of limiting what sites can do when they are opened from limited choices given to me. Some possibilites: context menus that open a site, instead of giving the link in a copiable way; software help that open a site, instead of showing local help files, as i expect (and they do not tell this is what will be done); development testing with clean and specific browser settings; development testing with clean and specific browser version.
Searching a solution for this problem, i found the discussion https://stackoverflow.com/questions/51706882/create-react-app-how-do-i-npm-start-with-a-specific-browser , where is suggested to use the environment variable
BROWSER
to the commandnpm start
. This should solve my problem, as long as it also accepts an argument to this chosen browser. But to test, i first tried only the name of a browser that is not my default. It did not work!To be specific, in this issue, suppose we:
BROWSER=vivaldi; npm start
6.2 runexport BROWSER=vivaldi; npm start