Nuxt.js: npm run dev - UnhandledPromiseRejectionWarning: Unhandled promise rejection

Created on 22 Jun 2017  路  7Comments  路  Source: nuxt/nuxt.js

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.

This question is available on Nuxt.js community (#c825)

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

All 7 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gary149 picture gary149  路  3Comments

pehbehbeh picture pehbehbeh  路  3Comments

maicong picture maicong  路  3Comments

vadimsg picture vadimsg  路  3Comments

o-alexandrov picture o-alexandrov  路  3Comments