Skip to content
This repository was archived by the owner on Apr 13, 2023. It is now read-only.

Broken Next.js SSR after updating v1.4.8 -> v1.4.9. #921

Closed
jaydenseric opened this issue Aug 1, 2017 · 3 comments
Closed

Broken Next.js SSR after updating v1.4.8 -> v1.4.9. #921

jaydenseric opened this issue Aug 1, 2017 · 3 comments

Comments

@jaydenseric
Copy link
Contributor

After updating react-apollo@1.4.8 to the current version, 1.4.9, getDataFromTree imports as undefined when attempting SSR in a Next.js project.

Downgrading to react-apollo@1.4.8 fixes the issue.

Intended outcome:

import { getDataFromTree } from 'react-apollo'
if (!process.browser) console.log(getDataFromTree)

In a Next.js page decorator, this should log the function.

Actual outcome:

The import is undefined.

How to reproduce the issue:

I have not tested this with the official example code, but my app is not too different: https://github.com/zeit/next.js/blob/v3-beta/examples/with-apollo/lib/withData.js#L3

Version

  • apollo-client@1.8.1
  • react-apollo@1.4.9
@jbaxleyiii
Copy link
Contributor

@jaydenseric can you help me debug this? The 1.4.9 has more things exported from the server file (all of it in fact). I'm not sure why it isn't working?

@jbaxleyiii
Copy link
Contributor

can you import ReactApollo from "react-apollo" and tell me what is present?

@jbaxleyiii
Copy link
Contributor

@jaydenseric this was a weird UMD bundle issue that I have no idea what caused it! regardless, it is fixed in 1.4.10 (which is released) via #925

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

2 participants