Hey, I use docs Nextjs app dir. I added SuperToke...
# support-questions-legacy
w
Hey, I use docs Nextjs app dir. I added SuperTokens.init() in root layout but I have the error: ``Error: Initialisation not done. Did you forget to call the SuperTokens.init or Session.init function? ``. I don't use backend config and withSession for Nextjs because I've backend in Nestjs. I have this error in sessionUtils file:
Copy code
let session = await Session.getSession(baseRequest, baseResponse, options);
.
r
hey @weboux you need to initialise supertokens backend SDK as well, since you are using the session recipe from it.
w
so Can I use supertokens-web-js when I use nestjs?
r
For nestjs, you have to use supertokens-node
w
Ah sorry, I meant nextjs. Typo 😅
r
yea you can use web-js sdk
but for session functions, you have to also use node sdk
w
So in Nextjs web-js sdk and node sdk in nestjs and in nextjs for „data fetching by nextjs” in React server components I should use nextjs/headers in order to add cookies?
@rp_st?
2 Views