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

    Hot reload or watch does not work

    CLI
    4
    21
    6374
    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.
    • D
      dylanglockler last edited by

      I have an issue where hot reload works great for a while, then suddenly stops and reverts back to the last full build. I’m also only able to get hot reload started by renaming the public directory (to anything else) and then changing it back to public so I can reach my laravel API. After a bit, I get a CORS error:
      Access to XMLHttpRequest at ‘http://app.wb.localhost/user’ from origin ‘http://app.wb.localhost:8080’ has been blocked by CORS policy. For a while it was working pretty well, I’d have to reset once or twice a day, but suddenly it’s failing every few file updates. I’ve tried changing privileges on the storage directory, launching with sudo and making sure my config file is cached…

      dobbel 1 Reply Last reply Reply Quote 0
      • dobbel
        dobbel @dylanglockler last edited by

        @dylanglockler

        What’s the output of quasar info?

        Honestly that are a lot of things going very wrong. I personally would try to run it on another system and see how it behaves there.

        D 1 Reply Last reply Reply Quote 0
        • D
          dylanglockler @dobbel last edited by

          @dobbel

          I did a fresh install several times, each time documenting my steps, that’s how I was able to figure out if I rename the public directory it works. It has been working the last few weeks and suddenly having issues.

          Operating System - Darwin(19.6.0) - darwin/x64
          NodeJs - 10.0.0

          Global packages
          NPM - 6.14.8
          yarn - 1.13.0
          @quasar/cli - 1.1.3
          @quasar/icongenie - Not installed
          cordova - Not installed

          Important local packages
          quasar - 1.15.1 – Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
          @quasar/app - 2.1.14 – Quasar Framework local CLI
          @quasar/extras - 1.9.14 – Quasar Framework fonts, icons and animations
          eslint-plugin-quasar - Not installed
          vue - 2.6.12 – Reactive, component-oriented view layer for modern web interfaces.
          vue-router - 3.2.0 – Official router for Vue.js 2
          vuex - 3.6.0 – state management for Vue.js
          electron - Not installed
          electron-packager - Not installed
          electron-builder - Not installed
          @babel/core - 7.12.10 – Babel compiler core.
          webpack - 4.44.2 – Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, … and your custom stuff.
          webpack-dev-server - 3.11.0 – Serves a webpack app. Updates the browser on changes.
          workbox-webpack-plugin - Not installed
          register-service-worker - 1.7.1 – Script for registering service worker, with hooks
          typescript - 3.9.5 – TypeScript is a language for application scale JavaScript development
          @capacitor/core - Not installed
          @capacitor/cli - Not installed
          @capacitor/android - Not installed
          @capacitor/ios - Not installed

          Quasar App Extensions
          None installed

          Networking
          Host - DylanMBP.lan
          en0 - 192.168.101.18

          1 Reply Last reply Reply Quote 0
          • D
            dylanglockler last edited by

            Just realized that it was launching Safari instead of Chrome suddenly and the hot reloading seems to be working in Safari!

            dobbel 1 Reply Last reply Reply Quote 0
            • dobbel
              dobbel @dylanglockler last edited by dobbel

              @dylanglockler

              NodeJs - 10.0.0

              For Quasar v1 you should use nodejs v12.x.

              I did a fresh install several times, each time documenting my steps,

              I meant running it on a Windows or linux based OS instead of Mac.

              D 1 Reply Last reply Reply Quote 0
              • D
                dylanglockler last edited by dylanglockler

                I live on a boat, and all I have is a mac. Thanks, I’ll check on the v of node. I am seeing more hot reload info in Safari, when it stops working, here’s what I get:

                [HMR] Aborted because ./src/store/post.js is not accepted
                Update propagation: ./src/store/post.js -> ./src/store/index.js -> ./.quasar/app.js -> ./.quasar/client-entry.js -> 0
                hotApplyInternal@http://app.wb.localhost:8080/app.js:558:39
                hotApply@http://app.wb.localhost:8080/app.js:412:35
                http://app.wb.localhost:8080/app.js:387:30
                promiseReactionJob@[native code]

                I also noticed that if I rename my public directory from ‘public’ and refresh, the hot reload starts working again. I’m developing a mixed quasar environment with Laravel backend. I access the Laravel API through a virtual server and i’m running the hot reload on port 8080 with quasar dev with this command:

                sudo quasar dev -H app.wb.localhost

                dobbel 1 Reply Last reply Reply Quote 0
                • dobbel
                  dobbel @dylanglockler last edited by dobbel

                  @dylanglockler said in Hot reload or watch does not work:

                  I live on a boat, and all I have is a mac.

                  You could consider using virtrual box to run it with another OS. Apart from that I unfortunately have no clues/ideas on how to fix your problem .

                  D 1 Reply Last reply Reply Quote 0
                  • D
                    dylanglockler @dobbel last edited by

                    You could consider using virtrual box to run it with another OS. Apart from that I unfortunately have no clues/ideas on how to fix your problem .

                    Hey, thanks for the suggestion and for taking the time to consider the issue i’m having. Virtual Box looks like it could work, might resolve some issues and add some other benefits!

                    1 Reply Last reply Reply Quote 0
                    • J
                      JBGoldberg last edited by

                      I am having the same reload issue here, also using a Mac.
                      It started after adding support to Quasar and a package update. 😕

                      1 Reply Last reply Reply Quote 0
                      • D
                        dylanglockler @dobbel last edited by

                        @dobbel I setup Laravel Homestead with Vagrant using VirtualBox (on mac os). I’m able to run the site as a virtual server but when I run the dev -H for hot reload, I’m getting site not found - I’m thinking maybe has to do with the port. I tried using a port in the Homestead.yaml, but then dev with hot reload advances to the next port.

                        dobbel 3 Replies Last reply Reply Quote 0
                        • dobbel
                          dobbel @dylanglockler last edited by

                          This post is deleted!
                          1 Reply Last reply Reply Quote 0
                          • dobbel
                            dobbel @dylanglockler last edited by dobbel

                            @dylanglockler

                            Sorry I don’t really understand your setup and what is running where and why.

                            I run the dev -H for hot reload

                            that’s for setting a hostname, -H . What has this to do with hot reload? Quastion : without -H quasar dev does show a site?

                            1 Reply Last reply Reply Quote 0
                            • dobbel
                              dobbel @dylanglockler last edited by

                              @dylanglockler

                              I found some info about hot reload fixes in the docs:

                              If there appears to be an issue with hot reload, you can try two fixes:
                              
                              Change the permissions for the project folder with
                              
                              sudo chown -R username: .
                              or run the dev server with root privileges
                              
                              sudo quasar dev
                              

                              (scroll down, last entry)
                              https://quasar.dev/quasar-cli/commands-list#Dev

                              1 Reply Last reply Reply Quote 0
                              • D
                                dylanglockler last edited by

                                @dobbel

                                Appreciate the note - fundamentally I’m trying to setup Qasar front-end with a Laravel back-end (API) WITH hot reload working (otherwise development is unreasonably cumbersome). It works, with one little trick: I have to rename larave/public to public_x, run the command: sudo quasar dev -H app.wb.localhost

                                And then rename public_x back to public (so the app can access the API through the Laravel side on a virtual host I setup)

                                And then it’s AMAZING - I can work so quick, editing my quasar vue files, hot reload refreshes as expected - maintains state and logs me out of the app when I make changes to config or store files - all good!

                                But after a while, it will suddenly revert to the last version created when I last ran the build command. For a while it was only doing this once or twice a day and I was just working with that… but now, after just a few edits, it resets. I can find no errors in any logs nor can I find any common step that causes it to suddenly stop using the hot reload files and suddenly start serving the previous production build.

                                From your earlier suggestion, I did try switching over to a VirtualBox - built on Homestead + Vagrant. I’m able to get the server up and serving either Laravel or Quasar but having a time figuring out how to get both running simultaneously. Every time I try to run quasar dev it seems to work but but the browser can’t connect to server. I have the route in my hosts etc:
                                192.168.10.10 wanderbird.test

                                and my quasar info:

                                Operating System - Linux(5.4.0-65-generic) - linux/x64
                                NodeJs - 14.15.4

                                Global packages
                                NPM - 6.14.11
                                yarn - 1.22.10
                                @quasar/cli - 1.1.3
                                cordova - Not installed

                                Important local packages
                                quasar - 1.11.3 – Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
                                @quasar/app - 1.8.10 – Quasar Framework local CLI
                                @quasar/extras - 1.8.1 – Quasar Framework fonts, icons and animations
                                vue - 2.6.11 – Reactive, component-oriented view layer for modern web interfaces.
                                vue-router - 3.2.0 – Official router for Vue.js 2
                                vuex - 3.4.0 – state management for Vue.js
                                electron - 7.1.4 – Build cross platform desktop apps with JavaScript, HTML, and CSS
                                electron-packager - Not installed
                                electron-builder - Not installed
                                @capacitor/core - Not installed
                                @capacitor/cli - Not installed
                                @capacitor/android - Not installed
                                @capacitor/ios - Not installed
                                @babel/core - 7.7.4 – Babel compiler core.
                                webpack - 4.43.0 – Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, … and your custom stuff.
                                webpack-dev-server - 3.11.0 – Serves a webpack app. Updates the browser on changes.
                                workbox-webpack-plugin - 4.3.1 – A plugin for your Webpack build process, helping you generate a manifest of local files that workbox-sw should precache.
                                register-service-worker - 1.7.1 – Script for registering service worker, with hooks
                                typescript - 3.8.3 – TypeScript is a language for application scale JavaScript development

                                Quasar App Extensions
                                None installed

                                Networking
                                Host - homestead
                                eth0 - 10.0.2.15
                                eth1 - 192.168.10.10

                                Any thoughts you might have would be greatly appreciated!

                                dobbel 2 Replies Last reply Reply Quote 0
                                • dobbel
                                  dobbel @dylanglockler last edited by

                                  @dylanglockler

                                  I will read your post more thoroughly later, but just quick comment about your quasar info output:

                                  NodeJs - 14.15.4

                                  Use Nodejs v12.x ( no other version for Qv1 apps)

                                  See:
                                  https://quasar.dev/quasar-cli/installation

                                  1 Reply Last reply Reply Quote 0
                                  • dobbel
                                    dobbel @dylanglockler last edited by

                                    @dylanglockler said in Hot reload or watch does not work:

                                    While reading the Quasar doc I came across this:

                                    https://quasar.dev/quasar-cli/quasar-conf-js#Docker-and-WSL-Issues-with-HRM

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