Hi there, I would like some assistance please, I noticed on your documentaton you provide the ES6 imports etc, but I'm using commonJS require statements, I tried to convert them like so -
"const supertokens = require('supertokens-node')
const middleware = require('supertokens-node/framework/express')
const Session = require('supertokens-node/recipe/session')
const ThirdPartyEmailPassword = require('supertokens-node/recipe/thirdpartyemailpassword')"
but I run into the error
"/Users/georgebeard/Documents/Work/OurLoyaltyClub/dev/ourloyaltyclub-backend/server.js:140
app.use(middleware())
^
TypeError: middleware is not a function
at Object.
(/Users/georgebeard/Documents/Work/OurLoyaltyClub/dev/ourloyaltyclub-backend/server.js:140:9)
at Module._compile (node:internal/modules/cjs/loader:1126:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
at Module.load (node:internal/modules/cjs/loader:1004:32)
at Function.Module._load (node:internal/modules/cjs/loader:839:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47
[nodemon] app crashed - waiting for file changes before starting..."
I'm trying to follow along here btw -
https://supertokens.com/docs/thirdpartyemailpassword/custom-ui/init/backend
thanks for your assistance!