fullstorydev / fullstory-browser-sdk

Official FullStory SDK for JavaScript, for web browsers
MIT License
55 stars 17 forks source link

Usage of v2 sdk with Next.js #190

Open arriye opened 10 months ago

arriye commented 10 months ago

Are there any samples with usage of the new v2 API with Next.js (v12)? I have to rollback to the 1.7.1 version otherwise it breaks the app with a ReferenceError. Thanks!

patrick-fs commented 9 months ago

Hi @arriye would you please provide the error output about the ReferenceError and when the error is thrown (i.e. during the build or at run time)

timtucker-dte commented 1 month ago

Looking at this locally, the ReferenceError that shows up is that window is not defined.

See the following for details on the issue and examples for how to address it: https://blog.bitsrc.io/using-non-ssr-friendly-components-with-next-js-916f38e8992c