miband-js icon indicating copy to clipboard operation
miband-js copied to clipboard

ReferenceError: TextDecoder is not defined

Open josemariagarcia95 opened this issue 4 years ago • 0 comments

I'm trying to use this library to read data from a Xiaomi 2 Band with Node. I got a Bluetooth dongle and did several changes on the example code (since I cannot access Web Bluetooth from plain Node.js and the webbluetooth package doesn't seem to work at the moment). I can detect the device and presumably connect to it but I've stumbled upon this problem. When I try to create a new Miband object I get an exception from this line of miband.js (line 78).

this.textDec = new TextDecoder();

SO: Windows 10 x64 Node version: v10.15.0 Npm: 6.4.1

josemariagarcia95 avatar Jul 17 '19 08:07 josemariagarcia95