next-auth
next-auth copied to clipboard
Api auth path error when using with turbopack
Environment
System:
OS: Windows 11 10.0.22631
CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz
Memory: 4.35 GB / 15.78 GB
Binaries:
Node: 22.2.0 - C:\Program Files\nodejs\node.EXE
npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
pnpm: 9.1.4 - C:\Program Files\nodejs\pnpm.CMD
bun: 1.1.12 - ~\.bun\bin\bun.EXE
Browsers:
Edge: Chromium (125.0.2535.92)
Internet Explorer: 11.0.22621.3527
npmPackages:
next: 14.2.3 => 14.2.3
next-auth: 5.0.0-beta.19 => 5.0.0-beta.19
react: 18.3.1 => 18.3.1
Reproduction URL
https://github.com/sawa-ko/next-auth-example/tree/draft/interesting-haze
Describe the issue
Currently when you try to use next-auth api routes with turbopack you get an error that x library could not be parsed.
Error: Could not parse module '[project]/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/server/future/route-modules/app-route/vendored/contexts/app-router-context.js'
How to reproduce
- Use the reproduction project
- Try login with the login button
- See error
Expected behavior
That next-auth can be used correctly, because with webpack it works fine.
Hi @sawa-ko, your issue seems to be related to this one: https://github.com/vercel/next.js/issues/66162. The fix will be in Next.js v14.3.0 when released
Hi @sawa-ko,
i was having this issue in version 5.0.0-beta.19. I downgraded to 5.0.0-beta.18 and it worked for me.
@tevass I can confirm that using the version you say works fine again.
I can also confirm that 5.0.0-beta.19 is introducing issue with [email protected] and [email protected].
Downgrading to 5.0.0-beta.18 is also fixing the issue with Turbo!
I can also confirm that
5.0.0-beta.19is introducing issue with[email protected]and[email protected]. Downgrading to5.0.0-beta.18is also fixing the issue with Turbo!
The same here. Thank you.
I was getting the error:
Error: Could not parse module '[project]/node_modules/next/dist/server/future/route-modules/app-route/vendored/contexts/app-router-context.js'
Thanks for posting this. I also had this error on 5.0.0-beta.19. Downgrading to 5.0.0-beta.18 fixed it 👍
Im also getting this error. Downgrading to 5.0.0-beta.18 fixed my issue.
5.0.0-beta.20 not fixed, sad
this bug is breaking login, rolling back to beta 18. still broken in beta 20
Hi folks, I did some digging here! See #11551 for the solution/explanation. A fix will be out in the next release!
downgrading to 5.0.0-beta.18 worked in dev. Build still breaks. Did somebody build properly? Thanks!
downgrading to 5.0.0-beta.18 worked in dev. Build still breaks. Did somebody build properly? Thanks!
I am able to build without issues on 5.0.0-beta.18.