Skip to content

Testing helper generateSessionCookie error: subpath './testing' is not defined by "exports" #1945

Open
@stevechanvii

Description

@stevechanvii

Checklist

Description

We are using PlayWrite and need to generate a session by generateSessionCookie, this function can be imported in other files but not in testing files, I got this error:
Error: Package subpath './testing' is not defined by "exports" in /Users/......./node_modules/@auth0/nextjs-auth0/package.json

Some other people also face same error: #1857

Reproduction

Follow this example https://github.com/auth0/nextjs-auth0/blob/main/EXAMPLES.md#generatesessioncookie in testing file

Additional context

No response

nextjs-auth0 version

4.0.2

Next.js version

15.1.6

Node.js version

22.13.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions