sushinpv / react-secure-storage

This is a wrapper written above local storage to write the data securely to local storage
https://npmjs.com/package/react-secure-storage
MIT License
126 stars 12 forks source link

Type Error #51

Open HakanSungur opened 2 weeks ago

HakanSungur commented 2 weeks ago

I'm using React 18 under the Remix Framework and configuring it with Vite. My necessary keys are written in the .env file. I am importing secureLocalStorage like this: import secureLocalStorage from "react-secure-storage"; I am using it like this: const userId = secureLocalStorage.getItem("userId"); I'm encountering this error: TypeError: __vite_ssr_import_2__.default.getItem is not a function. I would appreciate your help. Also, in my Vite configuration, the following exists:

  "process.env": {},
  global: {},
}

Node v20.15.1