Liryna / FacebookBot

A Facebook bot for Telegram
MIT License
50 stars 24 forks source link

Error on Bot startup #11

Closed rschaerer closed 6 years ago

rschaerer commented 6 years ago

I get the following error on bot Startup with TELEGRAM_USER="[USERNAME]" APP_TOKEN="[TOKEN]" node facebookbot.js:

/home/nosudo/telegram/FacebookBot/facebookbot.js:29
login({email: config.email, password: config.password}, async function (err, api) {
                                                        ^^^^^

SyntaxError: missing ) after argument list
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:389:7)
    at startup (bootstrap_node.js:149:9)

Does anyone know what I'm doing wrong?

Kreastr commented 6 years ago

I guess you have this issue. https://stackoverflow.com/questions/46306997/syntaxerror-missing-after-argument-list-when-using-async

rschaerer commented 6 years ago

Thanks @Kreastr . I'll check this and tell you if this was the case. If yes, I'll issue a PR with extended dependencies (and fix the ###usage markdown markup issue as well).

rschaerer commented 6 years ago

Hi @Kreastr , thanks for your guess! My old nodejs version really was the issue. :hugs: