MarcelRobitaille / bbyen

Bring Back YouTube Email Notifications! YouTube upload email notification replacement
MIT License
10 stars 0 forks source link

SyntaxError: Unexpected token '?' #8

Closed NightMean closed 2 years ago

NightMean commented 2 years ago

I followed the installation manual but after running the app with node src/index.js I received this error.

node src/index.js
/opt/YoutubeNotify-bbyen/src/lib/logger.js:10
        message: [ info.message, ...(info[Symbol.for('splat')] ?? []) ].join(' '),
                                                                ^

SyntaxError: Unexpected token '?'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/opt/YoutubeNotify-bbyen/src/google/auth/index.js:9:16)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)

Did I do anything wrong or is the library outdated and perhaps no longer works? The config filename is correct as per installation setup google-credentials.json

Config setup ``` { "email": { "host": "smtp.gmail.com", "port": 465, "secure": true, "auth": { "user": "*****@gmail.com", "pass": "*****" }, "sendingContact": "\"Youtube\" *****@gmail.com", "destination": "**********@gmail.com" }, "database": { "filename": "database.sqlite" }, "timers": { "subscriptions": "1 days", "videos": "2 hours" }, "kickoff": { "subscriptions": true, "videos": true }, "logging": { "level": "debug" } } ```
MarcelRobitaille commented 2 years ago

Hi @NightMean. Thanks for the report. What version of node.js are you using?

NightMean commented 2 years ago

Oh my.. I apologize. I followed old tutorial for node js where v12 was listed. I installed LTS v16 and the issue dissapeared. I was able to proceed further. Thanks for the quick heads up!

MarcelRobitaille commented 2 years ago

Glad you got it sorted. BTW the earliest version supported is 14