Closed as-iotex closed 8 months ago
i haven't run into this error before, but you can try adding https://www.npmjs.com/package/node-sessionstorage to your project, importing with const storage = require('node-sessionstorage')
and providing { sessionStorage: storage }
to phoenix
Same issue here
same issue here
I also had this issue. I solved by removing @types/phoenix
and installing phoenix@1.6
I just tried this and it works for me, including in a PR to add to README, let me know if it works for you:
Install required libraries:
npm install ws node-localstorage
- Import and include the libraries in
connectOptions
:import { WebSocket } from 'ws'; import { LocalStorage } from 'node-localstorage'; const client = new OpenSeaStreamClient({ network: Network.TESTNET, token: 'YOUR_API_KEY', connectOptions: { transport: WebSocket, sessionStorage: LocalStorage } });
I am using NodeJS 18.18.0 on Ubuntu and I am getting an error because phoenix is accessing sessionStorage:
My script is as follows:
I am not an expert in JS so please forgive me is this is a dumb question
Thanks