How to change default browser? Npm error

Hi guys, I’am freshman to manjaro.
I installed manjaro KDE, then installed my programs for web development. After this i wanted to start my react app using npm start.
But i Got a error that usr/bin/Firefox
I think this problem is because i uninstalled Firefox and installed Google Chrome but how do y change that in terminal?

Hi,
With KDE the default browser can be set :

  • KDE System configuration Applications
  • Directly in the browser

But in your case I suspect a miss configuration of npm
Firefox is located /usr/bin/firefox (all lowercase)

I know that but i want to my npm start use usr/bin/google-chrome but to do that i need to change $BROWSER variable but i dont know where it is and how to do it

If you use bash, then add this to your ~/.bashrc:

export BROWSER="$(if [[ -n $DISPLAY ]] && [[ -n $(which google-chrome) ]]; then echo 'google-chrome'; else echo 'firefox'; fi)"

https://wiki.archlinux.org/index.php/environment_variables#Default_programs

Except for I dont think thats the thing.
That isnt a common variable - I dont have it set for example.
( do you? echo $BROWSER )
The wiki article is referencing it for very specific cases where it could useful:

BROWSER contains the path to the web browser. Helpful to set in an interactive shell configuration file so that it may be dynamically altered depending on the availability of a graphic environment, such as X

And thus … I dont think some bashrc magic to set it is really the right approach.

The issue is likely in their npm setup as already stated:

Some Google answers about

react npm how to set default browser

You may found a npm module as helper or some suggestion to use .env file or a Tuto.

https://www.thetopsites.net/article/51706882.shtml