Running the nuxt.js app in dev mode using "npm run dev".
The moment I change any style(.scss) file or nuxt.config file, the bundle get succeeded but if I refresh the browser then it hangs and there is an error in console as "UnhandledPromiseRejectionWarning: Unhandled promise rejection".
Is there any workaround to resolve this issue. I've to run again "npm run dev" to see the changes. Its really delaying the development productivity.
Which Nuxt version are you running?
I used the "1.0.0-alpha.4" as well as "0.10.6". Seeing this problem in both versions. Below is the exact error description
(node:23564) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): TypeError: Cannot read property 'replace' of undefined
I asked, because I observed a similar behaviour (unhandled promise rejection on refresh) when I tried to update to 1.0.0-alpha.4. I think this seemingly non-deterministic behaviour had something to do with Nuxt 1.0 using the runInNewContext: true for performance optimisations (this setting was introduced with VueJS 2.3.0 https://github.com/vuejs/vue/releases/tag/v2.3.0). I stopped investigating at some point and rolled back to my stable setup using
"nuxt": "v0.10.7",
"vue": "2.2.6"
Dunno if your problem is somehow related to this, at least it sounds familiar to me.
Thanks for the details. Looks like all the "async" path, try & catch, has to be handled before rethrowing it. I just put bare minimum "console.log" in axios catch handler and after that, this problem has gone. Node is happy. Appreciate your help and time for giving the pointer to look.
@racksen, I currently have this problem with Nuxt & Express. Could you please post a quick code example of your serverjs and axioms call? Many thanks
Maybe this is related to the upstream issue https://github.com/vuejs-templates/webpack/pull/974?
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
@racksen, I currently have this problem with Nuxt & Express. Could you please post a quick code example of your serverjs and axioms call? Many thanks