Search code examples
vue.jsfirefoxnuxt.jswebpack-hmrfirefox-developer-edition

Nuxt Firefox console errors webpack hmr


I just made a brand new project with Nuxt using the npx create-nuxt-app command. This error might not be related to Nuxt it self but its really annoying to have it in all my nuxt projects and I struggle to get rid of it. It appears in Firefox developer edition when I run the npm run dev command for localhost.

The connection to http://localhost:3000/__webpack_hmr/client was interrupted while the page was loading.

The connection to http://localhost:3000/_loading/sse was interrupted while the page was loading.

Any idea how to get rid of this ? thanks


Solution

  • Wow, never realized this error is always present in Firefox. Usually, this kind of thing just disappear when your refresh the page once but it looks like it is persisted in Firefox indeed.

    I guess this have something to do with the way HMR websockets are done.
    Here is a github issue talking about the problem and here is the most up to date mozilla bug report.
    Not sure if the latter is anyhow relevant.

    Maybe this is just a flag to set in Firefox or something related to Vue specifically. Nonetheless, you can filter-out some errors but putting -<your-query> in the console search. Works great to remove some annoying error that you don't really care about.

    This is how it looks

    enter image description here