Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nuxt-link prefetch throws an exception when it becomes visible #5751

Closed
makweb opened this issue May 16, 2019 · 6 comments · Fixed by #5752
Closed

nuxt-link prefetch throws an exception when it becomes visible #5751

makweb opened this issue May 16, 2019 · 6 comments · Fixed by #5752

Comments

@makweb
Copy link

makweb commented May 16, 2019

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)
@ghost ghost added the cmty:bug-report label May 16, 2019
@rchl
Copy link

rchl commented May 16, 2019

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.

@edum18
Copy link

edum18 commented May 17, 2019

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

@pi0 pi0 mentioned this issue May 19, 2019
@rchl
Copy link

rchl commented May 19, 2019

@edum18 it's fixed in nuxt 2.7.2

@siegy22
Copy link

siegy22 commented Nov 7, 2019

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

@manniL
Copy link
Member

manniL commented Nov 11, 2019

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

@siegy22
Copy link

siegy22 commented Nov 11, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants