No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    How to let quasar-cli open Chrome with hot reload instead of Firefox?

    Help
    3
    7
    2914
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • rjansen
      rjansen last edited by

      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)

      1 Reply Last reply Reply Quote 0
      • LaurentPayot
        LaurentPayot last edited by

        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…

        1 Reply Last reply Reply Quote 0
        • rjansen
          rjansen last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • LaurentPayot
            LaurentPayot last edited by

            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 1 Reply Last reply Reply Quote 0
            • rstoenescu
              rstoenescu Admin last edited by

              @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

              rjansen 1 Reply Last reply Reply Quote 0
              • rjansen
                rjansen @rstoenescu last edited by

                @rstoenescu It works by change the ‘./node_modules/opn/xdg-opn’ file like this:
                BROWSER=x-www-browser:firefox:seamonkey:mozilla:epiphany:konqueror:chromium-browser:google-chrome:$BROWSER
                to:
                BROWSER=x-www-browser:google-chrome:seamonkey:mozilla:epiphany:konqueror:chromium-browser:google-chrome:$BROWSER
                Thanks again!

                1 Reply Last reply Reply Quote 0
                • rjansen
                  rjansen @LaurentPayot last edited by

                  @LaurentPayot Thanks for your yarn link. I’m learning a lot these days 🙂

                  1 Reply Last reply Reply Quote 1
                  • First post
                    Last post