wpdas / naxios

Promise based NEAR Contract, NEAR Wallet, and RPC API Client for browser
https://wpdas.gitbook.io/naxios/
MIT License
2 stars 2 forks source link

ReferenceError: localStorage is not defined #3

Closed Johnson-8844 closed 2 months ago

Johnson-8844 commented 2 months ago

I've integrated naxios to get near.social profile data. But I'm facing an issue like

- info Creating an optimized production build .D:\Teckas Technologies\minsta\.next\server\chunks\686.js:136063
      const value = localStorage.getItem(key);
                    ^
ReferenceError: localStorage is not defined
    at D:\Teckas Technologies\minsta\.next\server\chunks\686.js:136063:21
    at new Promise (<anonymous>)
    at WebStorageService.getItem (D:\Teckas Technologies\minsta\.next\server\chunks\686.js:136062:12)
    at JsonStorage.getItem (D:\Teckas Technologies\minsta\.next\server\chunks\686.js:133902:25)
    at D:\Teckas Technologies\minsta\.next\server\chunks\686.js:137348:33
    at Generator.next (<anonymous>)
    at D:\Teckas Technologies\minsta\.next\server\chunks\686.js:133855:71
    at new Promise (<anonymous>)
    at __awaiter (D:\Teckas Technologies\minsta\.next\server\chunks\686.js:133851:12)
    at createStore (D:\Teckas Technologies\minsta\.next\server\chunks\686.js:137343:32)

Node.js v20.15.1
Static worker unexpectedly exited with code: 1 and signal: null
- info Creating an optimized production build ...D:\Teckas Technologies\minsta\.next\server\chunks\686.js:136063
      const value = localStorage.getItem(key);
                    ^
ReferenceError: localStorage is not defined
    at D:\Teckas Technologies\minsta\.next\server\chunks\686.js:136063:21
    at new Promise (<anonymous>)
    at WebStorageService.getItem (D:\Teckas Technologies\minsta\.next\server\chunks\686.js:136062:12)
    at JsonStorage.getItem (D:\Teckas Technologies\minsta\.next\server\chunks\686.js:133902:25)
    at D:\Teckas Technologies\minsta\.next\server\chunks\686.js:137348:33
    at Generator.next (<anonymous>)
    at D:\Teckas Technologies\minsta\.next\server\chunks\686.js:133855:71
    at new Promise (<anonymous>)
    at __awaiter (D:\Teckas Technologies\minsta\.next\server\chunks\686.js:133851:12)
    at createStore (D:\Teckas Technologies\minsta\.next\server\chunks\686.js:137343:32)

Node.js v20.15.1
- info Creating an optimized production build .D:\Teckas Technologies\minsta\.next\server\chunks\686.js:136063
      const value = localStorage.getItem(key);
                    ^
ReferenceError: localStorage is not defined
    at D:\Teckas Technologies\minsta\.next\server\chunks\686.js:136063:21
    at new Promise (<anonymous>)
    at WebStorageService.getItem (D:\Teckas Technologies\minsta\.next\server\chunks\686.js:136062:12)
    at JsonStorage.getItem (D:\Teckas Technologies\minsta\.next\server\chunks\686.js:133902:25)
    at D:\Teckas Technologies\minsta\.next\server\chunks\686.js:137348:33
    at Generator.next (<anonymous>)
    at D:\Teckas Technologies\minsta\.next\server\chunks\686.js:133855:71
    at new Promise (<anonymous>)
    at __awaiter (D:\Teckas Technologies\minsta\.next\server\chunks\686.js:133851:12)
    at createStore (D:\Teckas Technologies\minsta\.next\server\chunks\686.js:137343:32)

Node.js v20.15.1
- info Creating an optimized production build ..D:\Teckas Technologies\minsta\.next\server\chunks\686.js:136063
      const value = localStorage.getItem(key);
                    ^
ReferenceError: localStorage is not defined
    at D:\Teckas Technologies\minsta\.next\server\chunks\686.js:136063:21
    at new Promise (<anonymous>)
    at WebStorageService.getItem (D:\Teckas Technologies\minsta\.next\server\chunks\686.js:136062:12)
    at JsonStorage.getItem (D:\Teckas Technologies\minsta\.next\server\chunks\686.js:133902:25)
    at D:\Teckas Technologies\minsta\.next\server\chunks\686.js:137348:33
    at Generator.next (<anonymous>)
    at D:\Teckas Technologies\minsta\.next\server\chunks\686.js:133855:71
    at new Promise (<anonymous>)
    at __awaiter (D:\Teckas Technologies\minsta\.next\server\chunks\686.js:133851:12)
    at createStore (D:\Teckas Technologies\minsta\.next\server\chunks\686.js:137343:32)

Node.js v20.15.1

> Build error occurred
Error: Call retries were exceeded
    at ChildProcessWorker.initialize (D:\Teckas Technologies\minsta\node_modules\next\dist\compiled\jest-worker\index.js:1:11661)
    at ChildProcessWorker._onExit (D:\Teckas Technologies\minsta\node_modules\next\dist\compiled\jest-worker\index.js:1:12599)
    at ChildProcess.emit (node:events:519:28)
    at ChildProcess.emit (node:domain:488:12)
    at ChildProcess._handle.onexit (node:internal/child_process:294:12) {
  type: 'WorkerError'
}
PS D:\Teckas Technologies\minsta> 

Please solve an issue...

wpdas commented 2 months ago

Fix made in version 2.1.1