1

I am using npm live-server package to load my website on changes. However my page is getting opened in Edge even though my system default is Chrome. I tried this command which I saw in npm website.

live-server --browser=chrome

But it did not work. How do I make it to host on chrome.

LoneWolf
  • 119
  • 1
  • 11
  • Does this answer your question? [How to change default browser with VS Code's "open with live server"?](https://stackoverflow.com/questions/49289233/how-to-change-default-browser-with-vs-codes-open-with-live-server) – DecPK May 14 '21 at 08:54
  • No, I need help with npm extension live-server, not with VS Code. – LoneWolf May 14 '21 at 17:53

1 Answers1

2

Some Operating Systems apparently use --browser=google-chrome or --browser='Google Chrome' instead of --browser=chrome. Otherwise the issue may be with the Operating System not being able to locate the Chrome Browser. Try reinstalling Google Chrome on the specific user account with Administrator permissions, since this should add it to the PATH with the creation of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe.

Sources: How to change default browser with VS Code's "open with live server"?, 127.0.0.1 live-server in npm can't open in any browser. what is the problem here?.

Manas Khandelwal
  • 3,790
  • 2
  • 11
  • 24