Nuxt.js: Push navigation not working since 2.13 when using modern bundle

Created on 28 Jun 2020  路  5Comments  路  Source: nuxt/nuxt.js

Version

v2.13.2

Reproduction link

https://codesandbox.io/s/angry-rain-fctwb

Steps to reproduce

Since updating to Nuxt 2.13, every time I click a nuxt-link, the whole page is fully refreshed, instead of just updating the content of the page.
If I rollback to 2.12.x, I have no issue.

The issue is only present when I have modern: 'server', in my nuxt.config.js.

I'm also seeing this error in the console when building:

 ERROR  Cannot read property 'filter' of undefined

  at node_modules/@nuxt/webpack/dist/webpack.js:176:12
  at runMicrotasks (<anonymous>)
  at processTicksAndRejections (internal/process/task_queues.js:97:5)

What is expected ?

Clicking a link does not fully refresh the page

What is actually happening?

Clicking a link fully refreshes the page

This bug report is available on Nuxt community (#c10865)
bug-report

Most helpful comment

Hi! This is dup of #7562. Fix (#7635) already merged. Stay tuned for next release ;) (you can also use nuxt-edge which has the fix)

All 5 comments

I believe we have related issue here. Check
https://cmty.app/nuxt/nuxt.js/issues/c10826#comment-5ef328c011200fb6dea89a4b

@Atinux I believe the problem lies here:
packages/webpack/src/plugins/vue/modern.js:getAssets

  getAssets (name) {
    const asset = this.assets[name]
    if (!asset) {
      return
    }
    return new Promise((resolve) => {
      watcher.once(name, () => {
        return asset && resolve(asset)
      })
      return asset && resolve(asset)
    })
  }

Should return promise but if there is no asset returns void.

I got the same error, Nuxt 2.13.2

Hi! This is dup of #7562. Fix (#7635) already merged. Stay tuned for next release ;) (you can also use nuxt-edge which has the fix)

Confirmed that this is fixed in 2.13.3

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bimohxh picture bimohxh  路  3Comments

maicong picture maicong  路  3Comments

vadimsg picture vadimsg  路  3Comments

mattdharmon picture mattdharmon  路  3Comments

bimohxh picture bimohxh  路  3Comments