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

Server-side error in with-loading example? #827

Closed
moarwick opened this issue Jan 19, 2017 · 2 comments
Closed

Server-side error in with-loading example? #827

moarwick opened this issue Jan 19, 2017 · 2 comments
Assignees

Comments

@moarwick
Copy link

The with-loading example works well client-side, but on hard refreshing the /forever or /about routes, it throws Cannot read property 'Component' of undefined. Component is being imported from React in those two pages. Full trace:

TypeError: Cannot read property 'Component' of undefined
    at _callee3$ (http://localhost:3000/_next/-/main.js:11570:50)
    at tryCatch (http://localhost:3000/_next/-/commons.js:12871:40)
    at Generator.invoke [as _invoke] (http://localhost:3000/_next/-/commons.js:13162:22)
    at Generator.prototype.(anonymous function) [as next] (http://localhost:3000/_next/-/commons.js:12923:21)
    at step (http://localhost:3000/_next/-/commons.js:3111:30)
    at http://localhost:3000/_next/-/commons.js:3129:14
    at F (http://localhost:3000/_next/-/commons.js:1634:28)
    at http://localhost:3000/_next/-/commons.js:3108:12
    at doRender (http://localhost:3000/_next/-/main.js:11587:18)
    at Object._callee$ (http://localhost:3000/_next/-/main.js:11489:20)
@arunoda arunoda self-assigned this Jan 19, 2017
@arunoda
Copy link
Contributor

arunoda commented Jan 19, 2017

Research Notes:

Returning null (or nothing) from getInitialProps() cause this issue.

@matthewmueller
Copy link
Contributor

matthewmueller commented Jan 20, 2017

+1 I've run into this before, returning {} resolves the issue, but it'd be good to provide that default considering the error is not helpful.

@lock lock bot locked as resolved and limited conversation to collaborators May 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants