Ubuntu 20
Node 12.18.4
NPM 6.14.6
Sequelize 6.3.5
I followed the official guide and am so confused now.
After successfully configured Sequelize and connected, I tried to run (from official documentation)
await sequelize.authenticate();
It throws SyntaxError: await is only valid in async function
.
Under the official get started page https://sequelize.org/master/manual/getting-started.html, it clearly states:
Most of the methods provided by Sequelize are asynchronous and therefore return Promises. They are all Promises , so you can use the Promise API (for example, using then, catch, finally) out of the box.
Of course, using async and await works normally as well.