loumadev / EdupageAPI

Simple node.js package to manage your EduPage account.
GNU General Public License v3.0
27 stars 2 forks source link

SyntaxError: Unexpected token '.' at /node_modules/edupage-api/src/Edupage.js:191 #3

Closed waheed-isk closed 3 years ago

waheed-isk commented 3 years ago

Hi, I'm trying to run the sample code in readme for getting timetable. The only thing I changed is the username and password arguments. I get the following error.

/node_modules/edupage-api/src/Edupage.js:191 iterate(_grades.data?.vsetkyUdalosti || {})

SyntaxError: Unexpected token '.'

Its the '.' after iterate(_grades.data? in front of vsetkyUdalosti || {})

loumadev commented 3 years ago

Hello, this module is using the latest JavaScript features and one of them is optional chaining ?.. This feature is available for Node.js v14.0.0 or above, so please make sure your installed version of Node.js supports this feature.

You can check your Node.js version using node -v.

Most likely you will need to update your Node.js.