Kyle Schutt
07/30/2024, 5:53 PMAttributeFilterButton on a nextjs webapp. On a client-side rendered page, if we add the element, then we get the following error. This does not happen if we add a DateFilter fwiw. While this works locally even with the error eventually, it does not pass the production build scripts because of this error. Any insight as to what might be causing this specific element to error out when building a custom UI?
⨯ ReferenceError: document is not definedKyle Schutt
07/30/2024, 6:03 PMKyle Schutt
07/30/2024, 6:03 PMKyle Schutt
07/30/2024, 6:14 PMRadek Novacek
07/31/2024, 2:29 PMKyle Schutt
07/31/2024, 2:49 PMKyle Schutt
07/31/2024, 2:50 PMRadek Novacek
07/31/2024, 2:52 PMKyle Schutt
07/31/2024, 2:52 PMnpm run build without it throwing an error?Radek Novacek
07/31/2024, 2:53 PMKyle Schutt
07/31/2024, 2:54 PMRadek Novacek
07/31/2024, 2:55 PMKyle Schutt
07/31/2024, 2:56 PMuse client and i am able to load the InsightView just fine too (there is another bug we discussed a few weeks ago about InsightView and nextjs using dynamic routes)Kyle Schutt
07/31/2024, 3:00 PMKyle Schutt
07/31/2024, 3:00 PMimport dynamic from 'next/dynamic';
const DateFilter = dynamic(() => import('@gooddata/sdk-ui-filters').then(mod => mod.DateFilter), {
ssr: false
});
const AttributeFilterButton = dynamic(() => import('@gooddata/sdk-ui-filters').then(mod => mod.AttributeFilterButton), {
ssr: false
});Radek Novacek
07/31/2024, 3:00 PMKyle Schutt
07/31/2024, 3:00 PMKyle Schutt
07/31/2024, 3:00 PMRadek Novacek
07/31/2024, 3:00 PMKyle Schutt
07/31/2024, 3:01 PMKyle Schutt
07/31/2024, 3:01 PMRadek Novacek
07/31/2024, 3:01 PM