Describe the bug
Hello,
I’m encountering an issue with the @cursorify/react library while working with Gatsby. During the static HTML build process, I’m seeing the following error related to localStorage:
"localStorage" is not available during server-side rendering.
It seems that the CursorifyProvider component is trying to access localStorage during server-side rendering, which causes this error.
I’ve tried using dynamic imports and React.lazy() to prevent the issue, but the problem persists. Here’s the error trace for reference:
Steps to Reproduce:
Set up a Gatsby project with the latest version of @cursorify/react.
Use the CursorifyProvider component during the build process.
Run the build command (gatsby build).
Environment:
Gatsby version: Latest
@cursorify/react version: Latest
Node.js version: Latest
Has anyone encountered a similar issue or found a solution? Any guidance would be much appreciated.
Thank you in advance!
To reproduce
- Go to ...
- Click on ...
- Scroll down to ..
- See error
Browser
Windows 11
Validations
Describe the bug
Hello,
I’m encountering an issue with the @cursorify/react library while working with Gatsby. During the static HTML build process, I’m seeing the following error related to localStorage:
"localStorage" is not available during server-side rendering.
It seems that the CursorifyProvider component is trying to access localStorage during server-side rendering, which causes this error.
I’ve tried using dynamic imports and React.lazy() to prevent the issue, but the problem persists. Here’s the error trace for reference:
Steps to Reproduce:
Set up a Gatsby project with the latest version of @cursorify/react.
Use the CursorifyProvider component during the build process.
Run the build command (gatsby build).
Environment:
Gatsby version: Latest
@cursorify/react version: Latest
Node.js version: Latest
Has anyone encountered a similar issue or found a solution? Any guidance would be much appreciated.
Thank you in advance!
To reproduce
Browser
Windows 11
Validations