Briuor / wbm

wbm is an unofficial API to send bulk messages in whatsapp.
MIT License
203 stars 64 forks source link

Got an error when I tried to start #6

Closed vachzar closed 4 years ago

vachzar commented 4 years ago

I want to test from your example, but I got an error. can you help me?

$ node index.js
E:\project\wagela\node_modules\wbm\src\api.js:110
    } catch {
            ^

SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (E:\project\wagela\node_modules\wbm\src\index.js:1:8
0)
Briuor commented 4 years ago

Thank you @vachzar for open this issue. This is a not expected syntax error, can you put here the code you used to test and your node version?

vachzar commented 4 years ago

my bad, I'm using old node version (8+) that's why it show error because catch should be catch(err) in older version of nodejs I have upgraded to newest version and it's running smoothly

Briuor commented 4 years ago

I'm gonna change catch to catch(err) to support node v8. Thank you man, i hope you enjoy the library!