chatengine-io / react-chat-engine

React component for a cheap and easy chat API
138 stars 35 forks source link

ReferenceError: IntersectionObserver is not defined #131

Open BColeWebDev opened 2 years ago

BColeWebDev commented 2 years ago

Hey there, When trying to create the chat application using next JS i get this error on the page refresh

Server Error ReferenceError: IntersectionObserver is not defined This error happened while generating the page. Any console logs will be displayed in the terminal window.

Screen Shot 2022-05-04 at 5 37 38 PM
coderomantics commented 1 year ago

hi I have the same issue did u manage to solve it? I'm using next js and typescript

moonkorea00 commented 1 year ago

@BColeWebDev @coderomantics you may need client side code where the component is rendered after the dom is loaded since it seems to be using the intersection observer api under the hood.

egeyumlu-cl commented 11 months ago

Is there a known solution to this problem? I am currently building with nextjs as well. Couldn't figure out a solution.

re1fly commented 6 months ago

hey ! i found the solution, u must calling ur module like this :

image