How to let quasar-cli open Chrome with hot reload instead of Firefox?
If I run “quasar dev” the Chrome browser is openen, but is not able to accept hot reloads.
To accept hot reloads I had to run the command under sudo: “sudo quasar dev”, then Firefox is opening instead of Chrome. At least the hot reload works. But why is Firefox now my browser and how can I get Chrome with hot reload?
(I am using Linux Mint)
Probably because Firefox is the default browser for the root user (the user of sudo), and Quasar opens the default browser.
It’s weird that you have to use sudo. Did you install quasar-cli with sudo? Try uninstalling quasar-cli and re-installing it without sudo…
I removed quasar-cli (sudo npm uninstall -g quasar-cli) en installed it again under sudo (sudo npm install -g quasar-cli). This had no effect.
You should not use sudo to install npm stuff, because it gives root privilege to any mysterious sub-package installed.
You can fix this easily with https://docs.npmjs.com/getting-started/fixing-npm-permissions
Once npm fixed try uninstalling quasar-cli (with sudo) and re-installing it (without sudo).
Also these days lots of people replaced npm by yarn https://medium.com/@nikjohn/facebooks-yarn-vs-npm-is-yarn-really-better-1890b3ea6515
@rjansen Take a look at /build folder of your app and search for
opn. This is the package being used to automatically open a browser after build is ready. Tweak it to your needs. Current behavior is to open your default browser, but there are options to open another browser instead. https://github.com/sindresorhus/opn
@rstoenescu It works by change the ‘./node_modules/opn/xdg-opn’ file like this:
@LaurentPayot Thanks for your yarn link. I’m learning a lot these days