zdila / scratch-link-ble-linux

Scratch Link for BLE devices under Linux.
4 stars 0 forks source link

Unexpected token error #1

Closed grigorism closed 2 years ago

grigorism commented 2 years ago

Hello,

I'm trying to connect a Lego WeDo 2.0 Hub. I followed the installation and running instructions and i'm getting this error message:

$ node .
/home/administrator/scratch-link-ble-linux/index.js:312
  const device = props?.["org.bluez.Device1"];
                       ^

SyntaxError: Unexpected token .
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
zdila commented 2 years ago

Use Node 14 or later

zdila commented 2 years ago

@grigorism please let me know if it works for you after upgrading Node.js to 14 (or more). If not, feel free to open a new issue. Thanks!