react-ssr-prepass icon indicating copy to clipboard operation
react-ssr-prepass copied to clipboard

TypeError: Cannot read properties of undefined (reading 'current')

Open RomanFausek opened this issue 9 months ago • 3 comments
trafficstars

Is there an existing issue for this?

  • [x] I have searched the existing issues

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

Question

Hello,

I'm using next-urql, which has ssr-prepass built in. After upgrading to React 19 and Next.js 15, I'm encountering an issue. According to an urql maintainer, this seems to be related to your library. Could you provide guidance on resolving this?

Thank you!

https://github.com/urql-graphql/urql/discussions/3732#discussioncomment-12246852

Edit 1: I tried some dummy examples on the latest react and next packages and I am still getting the same error

if (typeof window === 'undefined') {
    // some dummy element (div) to run prepass on
    const element = createElement('div');

    await ssrPrepass(element);
  }

RomanFausek avatar Feb 19 '25 11:02 RomanFausek