Nuxt.js: nuxt-link prefetch throws an exception when it becomes visible

Created on 16 May 2019  路  6Comments  路  Source: nuxt/nuxt.js

Version

2.7.1

Reproduction link

https://codesandbox.io/s/codesandboxnuxt-tnli2?fontsize=14

Steps to reproduce

nuxt.config.js add to build section splitChunks:{layouts: false, pages: false},
scroll down until it becomes visible

What is expected ?

prefetch route link

What is actually happening?

exception in console Uncaught TypeError: Component(...).catch is not a function at VueComponent.prefetch

Additional comments?

Help :)

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

All 6 comments

So in that case components can't be preloaded because they are not lazy loaded (are already preloaded). I'll create a fix for catching the error.

I ran yarn install, it updated some packages and now I'm having the same error as I load the page. Is it fixed?

image

@edum18 it's fixed in nuxt 2.7.2

I'm using nuxt 2.10.1 and still run into this issue.

@siegy22 please create a new issue with a reproduction repo and a reference to this one

@manniL I'm trying to isolate it, but it's pretty hard as it's not consistent throwing that Error. 馃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pehbehbeh picture pehbehbeh  路  3Comments

bimohxh picture bimohxh  路  3Comments

vadimsg picture vadimsg  路  3Comments

maicong picture maicong  路  3Comments

uptownhr picture uptownhr  路  3Comments