_cristoforo_
02/28/2023, 6:54 PMTypeError: Cannot read properties of undefined (reading 'middleware')
when setting up boilerplate session verification on my express server when I import this package like so: import { verifySession } from 'supertokens-node/recipe/session/framework/express'
snackdex
02/28/2023, 7:27 PMimport { middleware } from "supertokens-node/framework/express";
_cristoforo_
02/28/2023, 7:28 PM_cristoforo_
02/28/2023, 7:29 PMmiddleware
method/function/class in this file and its corresponding express routes._cristoforo_
02/28/2023, 7:30 PMnode_modules/supertokens-node/lib/build/framework/express/index.js
file._cristoforo_
02/28/2023, 7:30 PMTypeError: Cannot read properties of undefined (reading 'middleware')
at Object.<anonymous> (/Users/<me>/Desktop/casimir/node_modules/supertokens-node/lib/build/framework/express/index.js:19:49)
_cristoforo_
02/28/2023, 7:30 PMsnackdex
02/28/2023, 7:31 PMsnackdex
02/28/2023, 7:31 PMlet app = express();
app.post("/like-comment", verifySession(), (req: SessionRequest, res) => {
let userId = req.session!.getUserId();
//....
});
_cristoforo_
02/28/2023, 7:31 PMGET
request._cristoforo_
02/28/2023, 7:32 PMsnackdex
02/28/2023, 7:32 PM_cristoforo_
02/28/2023, 7:32 PM_cristoforo_
02/28/2023, 7:33 PMsnackdex
02/28/2023, 7:34 PMsupertokens-node
are you using?_cristoforo_
02/28/2023, 7:36 PM"supertokens-node": "^13.1.2"
_cristoforo_
02/28/2023, 7:36 PM_cristoforo_
02/28/2023, 7:37 PM"supertokens-node": "latest"
_cristoforo_
02/28/2023, 7:38 PM_cristoforo_
02/28/2023, 7:46 PMsnackdex
02/28/2023, 7:46 PM_cristoforo_
02/28/2023, 7:46 PM_cristoforo_
02/28/2023, 7:47 PM