Closed dBianchii closed 9 months ago
I think this is actually next-auth's fault since they use the internal type AppRouteHandlerFn
which expects unknown. I'll check with Balazs
I think this is actually next-auth's fault since they use the internal type
AppRouteHandlerFn
which expects unknown. I'll check with Balazs
Yes. I fiddled around for a while, and it's exactly the return type of auth() that is causing the problem.
Is there a way to fix the typescript error?
UPDATE:
I just casted the auth()
route handler as (req: NextRequest) => Promise<Response>
. I don't think it should cause any problems, but I might be wrong.
should be fixed
Provide environment information
ystem: OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa) CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-11390H @ 3.40GHz Memory: 4.72 GB / 15.36 GB Container: Yes Shell: 5.0.17 - /bin/bash Binaries: Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm pnpm: 8.10.2 - ~/.local/share/pnpm/pnpm bun: 1.0.2 - ~/.bun/bin/bun
Describe the bug
When running
pnpm typecheck
, sometimes I get this error:The weird thing, ist that that sometimes this error does not appear. This is also happening on a fork I made. Happens on github CI as well for me.
Link to reproduction
I might add one later
To reproduce
Run
pnpm typecheck
after installing dependenciesAdditional information
No response