Hi, Can I use https://nextjs.org/docs/app/building...
# general
w
r
hey @weboux
can you enable backend debug logs and show the output?
w
yes, but I can just in the evening. I add only that when I do request in client components, it's ok (e. g. in custom hook) and I use package for reac, not nodejs because I have backend in Nestjs.
r
i don't follow. Sorry
w
hmm custom hooks isn't clients components xd I mean that requests in custom hooks and client components so in the files with 'use clients' directive, they work good. I use in nextjs project supertokens-web-js because I have backend in nestjs so I don't know if I can use one of your npm packages for nodejs or with this above. aa and I have warning: SuperTokens was already initialized although I initialize in only one place in my project and I use useEffect. But requests in files with 'use client' work good. I come back from Turborepo to webpack but it's the same.
debug logs: 2023-09-27T21:06:40.015Z com.supertokens {t: "2023-09-27T21:06:40.015Z", message: "middleware: Started", file: "/usr/src/app/node_modules/supertokens-node/lib/build/supertokens.js:217:26" sdkVer: "15.1.0"} 2023-09-27T21:06:40.016Z com.supertokens {t: "2023-09-27T21:06:40.016Z", message: "middleware: Not handling because request path did not start with config path. Request path: /files/all", file: "/usr/src/app/node_modules/supertokens-node/lib/build/supertokens.js:224:30" sdkVer: "15.1.0"} I have Files module with get for '/files/all'. short fragment of logs from nextjs: params strfy {"queryData":{"where":{"AND":[{"tags":"realistic"},{"tags":"manga"},{"tags":"anime"},{"tags":"comics"}]},"orderBy":{"createdAt":"desc"},"limit":"10"}} link http://localhost/files/all?%7B%22queryData%22%3A%7B%22where%22%3A%7B%22AND%22%3A%5B%7B%22tags%22%3A%22realistic%22%7D%2C%7B%22tags%22%3A%22manga%22%7D%2C%7B%22tags%22%3A%22anime%22%7D%2C%7B%22tags%22%3A%22comics%22%7D%5D%7D%2C%22orderBy%22%3A%7B%22createdAt%22%3A%22desc%22%7D%2C%22limit%22%3A%2210%22%7D%7D= (
Copy code
await fetch(`${url}?${new URLSearchParams(params)}`)
or
Copy code
await fetch(`${url}?${JSON.stringify(params)}`)
)
@rp_st now is ok?
@porcellus maybe you'll know?
aa and I get "Error: No instance of Session found. Make sure to call the Session.init method." although I initialise in only one place in my project and I use useEffect.