-
Notifications
You must be signed in to change notification settings - Fork 145
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
use countly-sdk-web in NextJs #72
Comments
Hi, |
thankyou, |
I am guessing this could be due to code transpiling in next or maybe some other case related to ssr.
And if still the error persists, then maybe its not because of |
Closing this for now, if you still experience this issue, please reopen :) |
It would be great if this issue could be reopened. @ar2rsawseen The problem with Next.js and Countly is that next.js works on both server and browser. On server
This one could help ;) Let me know if I can help somehow! |
We are still having this issue where Countly is throws a I would expect the library to only begin interacting with the DOM (or doing anything) when It is confusing to provide a method to trigger initialisation, but also begin initialising the sdk and interacting with the window at import time. Moving initialisation activities so that they are only triggered when the sdk consumer expects would make the library more flexible, and unblock the client teams who have commented on this ticket. |
I plan to use Countly for user usage data analytics. but when I import an error occurs which causes chrome to display
Internal Server Error
and on the chrome console it saysFailed to load resource: the server responded with a status of 500 (Internal Server Error)
but in the terminal it saysReferenceError: Element is not defined
this is my code
The text was updated successfully, but these errors were encountered: