Importing issue in react js project
I cannot use your incredible smooth scrolling library due to errors while importing in react js project. Please guide me to implement this in my project.

It simply says that the window object is not defined and it seems like you are using Next.Js not just React.Js in your project. In Next.Js projects we call the window object a little differently.
Next.Js offeres server side rendering, which means that your site runs on the server before running on the client. There is no window object on the server (Node.Js). Therefore, try calling the window object from the useEffect Hook. Refer to this article for better explanation.
https://articles.wesionary.team/window-object-in-nextjs-1e505349c6f5