I run my client side first then server side in my react.js project built using MERN stack and got the error below. Web UI runs well on client side

I run my client side first then server side in my react.js project built using MERN stack and got the error below. Web UI runs well on client side.
If I run the client side first the web interface loads perfectly at localhost:3000 but after running server side and reloading I get the following error how do I fix this?

VM6068:1 Uncaught 
SyntaxError: "undefined" is not valid JSON
    at JSON.parse (<anonymous>)
    at ./src/redux/slices/localSlice.js (localSlice.js:4:1)
    at options.factory (react refresh:6:1)
    at __webpack_require__ (bootstrap:22:1)
    at fn (hot module replacement:61:1)
    at ./src/redux/store.js (taskSlice.js:39:1)
    at options.factory (react refresh:6:1)
    at __webpack_require__ (bootstrap:22:1)
    at fn (hot module replacement:61:1)
    at ./src/index.js (SidebarContext.js:3:1)

(https://i.sstatic.net/BHsmyiyz.png)

Please assist me in debugging this error