Closed Shivamycodee closed 1 year ago
@Shivamycodee Can you pls report the version number of the SDK you are using?
@etherspot/prime-sdk : 1.3.8
@etherspot/prime-sdk : 1.3.8
Thanks. Please can you let us know OS details and do you have an example repository where we can reproduce this error?
Device specification:
Device name LAPTOP-T8QTOCJJ Processor Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz 1.19 GHz Installed RAM 20.0 GB (19.7 GB usable) Device ID .... Product ID ... System type 64-bit operating system, x64-based processor
windows specification:
Edition Windows 11 Home Insider Preview Single Language Version 23H2 Installed on 10/26/2023 OS build ... Serial number ... Experience Windows Feature Experience Pack 1000.25982.1000.0
package errors:
I saw u have updated the global code to:
(global as any).WebSocket = WebSocketConstructor;
but it still not working (installed it using : npm i @etherspot/prime-sdk@latest) , it's only working when i use window in place of global.
so i think something like this should be used:
if(global)
global.WebSocket = WebSocketConstructor;
else
window.WebSocket = WebSocketConstructor
whenever i have installed this package: @etherspot/prime-sdk and tried to use it i got a same error that few required packages of prime-sdk were missing:
1.rxjs
it works fine when i install this 2 packages to my app package.json.
and 1 more issue , in your file node-polyfill.js (node_modules@etherspot\prime-sdk\dist\node-polyfill.js)
websocket is considered as an part of global object, and i was getting error because my browsers (chrome and barve) were not able to understand what global is , so i changed it to windows ,
from : global.WebSocket = WebSocketConstructor; to : window.WebSocket = WebSocketConstructor;
and then installed my updated package, after this it's working fine.