azouaoui-med / react-pro-sidebar

React Pro Sidebar provides a set of components for creating high level and customizable side navigation
https://azouaoui-med.github.io/react-pro-sidebar/
MIT License
1.69k stars 414 forks source link

@ getUrlBasedHistory - error ReferenceError: document is not defined (document is a window that attempts to render on the server) #176

Closed Digitl-Alchemyst closed 1 year ago

Digitl-Alchemyst commented 1 year ago

Describe the bug This is the error message I get returned when i run the app in dev, I get a more detailed error when attempting to build.

To Reproduce Steps to reproduce the behavior:

  1. Create Next.js 13.4+ project (probably back to at least 13.2)
  2. Add react-pro-sidebar to project
  3. Restart Project
  4. Error should show in console

Expected behavior no errors

Screenshots More detailed Error msg from build image Sidebar still works with out issue

image

Sidebar code:

image image

which goes on from there laying out more nav items with a basic ending

image

Desktop (please complete the following information):

Additional context NextJS window is undefined fix #172 , is suppose to contain a fix for this, however when I went to try to add it into the sidebar code itself I found it was already there so this did not solve this issue for me clearly.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.