Skip to content

Cannot find module '@auth0/nextjs-auth0/server' or its corresponding type declarations. #2134

Closed
@deli-ght

Description

@deli-ght

Checklist

  • The issue can be reproduced in the nextjs-auth0 sample app (or N/A).
    I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
    I have looked into the API documentation and have not found a suitable solution or answer.
    I have searched the issues and have not found a suitable solution or answer.
    I have searched the Auth0 Community forums and have not found a suitable solution or answer.
    I agree to the terms within the Auth0 Code of Conduct.

Description

I followed the docs to install auth0 in my nextjs project, but the import throws error and there is no server folder in "@auth0/nextjs-auth0" package. How can I use Auth0Client in this case?

Image

Image

my auth0/nextjs-auth0 package version is ^3.7.0
Image

Reproduction

I follow this direction https://auth0.com/docs/quickstart/webapp/nextjs/interactive

Additional context

No response

nextjs-auth0 version

^3.7.0

Next.js version

15.3.2

Node.js version

v22.14.0

Activity

tusharpandey13

tusharpandey13 commented on Jun 2, 2025

@tusharpandey13
Contributor

Hi @deli-ght 👋
For nextjs versions > 13, we recommend using the latest version of our SDK (4.6.0 as of now).

npm install @auth0/nextjs-auth0@4.6.0

should update your nextjs version. For your reference, https://github.com/auth0-samples/auth0-nextjs-samples/tree/main/Sample-01 contains a working sample app with the latest major nextjs-auth0 version installed. Our quickstart and github documentation also correspond to the v4.x.x versions.

deli-ght

deli-ght commented on Jun 2, 2025

@deli-ght
Author

@tusharpandey13 Thanks for reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @tusharpandey13@deli-ght

        Issue actions

          Cannot find module '@auth0/nextjs-auth0/server' or its corresponding type declarations. · Issue #2134 · auth0/nextjs-auth0