Hi, thanks for amazing work, I've used your library on several projects now.
There's a problem with building NextJS app with new app router (I didn't try this on pages router, so I don't know if it's limited to app router):
error node_modules/react-equal-height/index.js (1:8585) @ e.exports [as insertStyleElement]
error ReferenceError: document is not defined
I cloned the library and narrowed down the issue. When I'm importing <EqualHeightElement /> from react-equal-height/clean it seems like that component imports context from the main package and thus trying to inject css styles. Then it fails on ssr, because document is undefined.
I just copied the EqualHeightElement component and changed import to:
import { EqualHeightContext } from 'react-equal-height/clean';
Hi, thanks for amazing work, I've used your library on several projects now.
There's a problem with building NextJS app with new app router (I didn't try this on pages router, so I don't know if it's limited to app router):
I cloned the library and narrowed down the issue. When I'm importing
<EqualHeightElement />
fromreact-equal-height/clean
it seems like that component imports context from the main package and thus trying to inject css styles. Then it fails on ssr, because document is undefined.I just copied the EqualHeightElement component and changed import to:
and it worked