async
1 trace
- Clerk @clerk/nextjs v6+: auth() and clerkClient() are async — `const { userId } = auth()` must be `await auth()`Code such as const { userId } = auth(), auth().protect() or clerkClient().users.getUser(id) produces userId undefined or .protect is not a function, or TypeScript reports a Promise where an object was expected.