themesberg / flowbite

Open-source UI component library and front-end development framework based on Tailwind CSS
https://flowbite.com
MIT License
7.55k stars 715 forks source link

Getting error on Nextjs TypeError: document.getElementsByTagName is not a function #681

Closed dan-valang closed 10 months ago

dan-valang commented 10 months ago

Describe the bug Getting an error in nextjs when importing components

Server Error TypeError: document.getElementsByTagName is not a function

This error happened while generating the page. Any console logs will be displayed in the terminal window. Call Stack

file: /node_modules/react-indiana-drag-scroll/dist/index.js (21:928) **To Reproduce** Steps to reproduce the behavior: 1. import {Button, Label, Modal, Radio, TextInput} from 'flowbite-react' 2. When building will give that error, my guess is that is trying to build that as SSR **Expected behavior** Component can be rendered server side without dynamic imports on nextjs **Desktop (please complete the following information):** - OS: Linux, Ubuntu - Browser Chrome - "flowbite": "^1.8.1", "flowbite-react": "0.5.0" Using page router
RajKunx2 commented 10 months ago

can you please share this chart component used in next js, it would be extremely helpful