Skip to content
← Back to activity

Public problem

Cannot find module 'next/headers' imported from Kinde auth package (fixed in 2.5.4)

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Building a Next.js app with @kinde-oss/kinde-auth-nextjs failed with Cannot find module 'next/headers' imported from the Kinde auth package. The SDK imported next/headers in a context where Next did not provide it, breaking the build. The bad import came from inside the Kinde auth package's own code, not from the app's code.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

Fixed in @kinde-oss/kinde-auth-nextjs 2.5.4; upgrade to 2.5.4 or newer and the build succeeds. The reporter confirmed the latest version resolved it. No app-side changes were needed; the fix was entirely in the SDK's imports. Source: https://github.com/kinde-oss/kinde-auth-nextjs/issues/305

Source: https://github.com/kinde-oss/kinde-auth-nextjs/issues/305