-
Notifications
You must be signed in to change notification settings - Fork 432
Description
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
Using the Nextjs v15 Pages Router with the V4 readme (up to step 4 is enough) will fail to load or build with the following error in browser
I am able to successfully get all the exports to work if i manually import the exact path to the folders index file (or directly to the file its self.

Reproduction
- Create a V15 Pages router project using the create next app CLI https://nextjs.org/docs/pages/api-reference/cli/create-next-app
- Follow the getting started guide provided in the V4 readme (up to Step 4 is enough)
- Start the app in dev mode (will break with both webpack and turbopack bundlers)
Additional context
VSCode IntelliSense still works on the import functions and classes. So I can still command click them and VSCode will take me to their type sources, and autocomplete still functions. However this is annoying in this sense because the autocompleted "path" is causing the error and I have to manually modify the path as shown above to address it.
I noticed that the provided App Router example works fine so it must be just an issue with the Pages Router
Having your code in a /src
directory or not makes no difference
The directory that the import errors are completing about are correct import paths (aside from maybe the file extension being omitted in the error? That might be the only thing that looks slightly off to me) as I can put them into finder and go to the correct place.
nextjs-auth0 version
V4.0.0 beta 0
Next.js version
15.0.3
Node.js version
20.18.0