Environment
System:
OS: Linux 6.8 Ubuntu 24.04.1 LTS 24.04.1 LTS (Noble Numbat)
CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
Memory: 18.36 GB / 31.26 GB
Container: Yes
Shell: 5.2.21 - /bin/bash
Binaries:
Node: 20.18.0 - ~/.nvm/versions/node/v20.18.0/bin/node
npm: 10.8.2 - ~/.nvm/versions/node/v20.18.0/bin/npm
Browsers:
Brave Browser: 129.1.70.126
npmPackages:
@auth/prisma-adapter: ^2.7.2 => 2.7.2
next: 14.2.15 => 14.2.15
next-auth: ^5.0.0-beta.22 => 5.0.0-beta.22
react: ^18 => 18.3.1
Reproduction URL
https://github.com/nextauthjs/next-auth/blob/main/apps/examples/nextjs/auth.ts
Describe the issue
I use 5.0.0-beta.22. and got the following typescript error when I want to declare new module for auth.ts as the example shows in the auth.js repository.
Invalid module name in augmentation, module 'next-auth/jwt' cannot be found.
declare module "next-auth/jwt" {
interface JWT {
accessToken?: string
}
}

How to reproduce
I use the auth.js example to config auth.ts. The example code gives me typescript error.

Expected behavior
Typescript should recognize the 'next-auth/jwt' module or define it directly with auth module.
Environment
Reproduction URL
https://github.com/nextauthjs/next-auth/blob/main/apps/examples/nextjs/auth.ts
Describe the issue
I use 5.0.0-beta.22. and got the following typescript error when I want to declare new module for auth.ts as the example shows in the auth.js repository.
How to reproduce
I use the auth.js example to config auth.ts. The example code gives me typescript error.
Expected behavior
Typescript should recognize the 'next-auth/jwt' module or define it directly with auth module.