-
Notifications
You must be signed in to change notification settings - Fork 64
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
Cannot read property 'pathname' of undefined #31
Comments
Interesting. If I recall I needed |
So passing router as a prop doesn't fix the issue. Hmm. Not sure what's goin on here... |
Hey Adam, were you able to resolve this one? I've been struggling with the same issue for a while now and have even posted to StackOverflow (here: https://stackoverflow.com/questions/57094132/mysterious-typeerror-while-running-next-apollo-react-apollo) with zero answers so far. My code is pretty short:
|
Did you find a solution yet, Andrew? |
Hey @amitschandillia - turns out this is actually an issue with next. There’s an open issue for it here: vercel/next.js#6042 |
Ahh...at least that's some pointer in the right direction. Thanks! :) |
Hey @adamsoffer, I'm wondering if you are still looking into this issue? Currently I'm unable to SSR pages with dynamic url because the render method is called twice. The first time the router object is undefined. |
Hey guys, this was resolved with |
Hey Adam, sorry for resurrecting a closed issue but I just updated to
Am I missing something? |
Yeah I forgot to add Install |
Ugh...now there's an invariant violation:
|
@amitschandillia - check out the next-apollo-example repo. It's using next-apollo |
I can't use this library because of the dependency issues, but when I copied most of the source code into my program, I started getting
I believe it's because you need to pass the
router
object as a prop, and I'm not sure if you need it in context. I'm referring to your line: https://github.com/adamsoffer/next-apollo/blob/master/src/withData.js#L43VS in https://github.com/zeit/next.js/blob/canary/examples/with-apollo/lib/with-apollo-client.js#L27 they pass it as a prop
The text was updated successfully, but these errors were encountered: