https://supertokens.com/ logo
Title
a

anand

01/23/2023, 11:30 AM
hello guys i can figure out why this error comes out with supertokens middleware in nestjs
r

rp

01/23/2023, 11:30 AM
hey! @porcellus can help here
a

anand

01/23/2023, 11:31 AM
every time the middleware is called in nestjs this error throws
p

porcellus

01/23/2023, 11:31 AM
hi
a

anand

01/23/2023, 11:31 AM
hi
p

porcellus

01/23/2023, 11:32 AM
what version of the node SDK are you using?
a

anand

01/23/2023, 11:32 AM
"supertokens-node": "12.1.6",
can i know the reason
r

rp

01/23/2023, 11:34 AM
Also, why is the
next
is not a function error coming?
p

porcellus

01/23/2023, 11:35 AM
the reason for asking the version number? the stack trace you added had line numbers I can check in our repo if I know the exact version 🙂
are you using express in nestjs?
a

anand

01/23/2023, 11:36 AM
using nest core v9
p

porcellus

01/23/2023, 11:38 AM
so you didn't add platform-fastify or anything, right?
a

anand

01/23/2023, 11:39 AM
"@nestjs/platform-express": "^9.0.0"
p

porcellus

01/23/2023, 11:40 AM
hmm, that rules out my next guess. could you show the config passed to supertokens?
a

anand

01/23/2023, 11:40 AM
sure
file
p

porcellus

01/23/2023, 11:43 AM
also, just to double check: you get the appropriate response, the issue is that you also get error logs in the console?
a

anand

01/23/2023, 11:48 AM
next fuction is passed by the req but not used my supertokens guard
p

porcellus

01/23/2023, 11:49 AM
it should be used in the exception filter
a

anand

01/23/2023, 12:01 PM
thanks for the help i resolved juest by re initilizing the module
p

porcellus

01/23/2023, 12:19 PM
sounds good 🙂