Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api auth path error when using with turbopack #11127

Closed
sawa-ko opened this issue Jun 10, 2024 · 12 comments · Fixed by #11551
Closed

Api auth path error when using with turbopack #11127

sawa-ko opened this issue Jun 10, 2024 · 12 comments · Fixed by #11551
Labels
bug Something isn't working upstream The issue dervies from one of next-auth dependencies

Comments

@sawa-ko
Copy link

sawa-ko commented Jun 10, 2024

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/next@14.2.3_react-dom@18.3.1_react@18.3.1/node_modules/next/dist/server/future/route-modules/app-route/vendored/contexts/app-router-context.js'

How to reproduce

  1. Use the reproduction project
  2. Try login with the login button
  3. See error

Expected behavior

That next-auth can be used correctly, because with webpack it works fine.

@sawa-ko sawa-ko added bug Something isn't working triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime. labels Jun 10, 2024
@emulienfou
Copy link

Hi @sawa-ko,
your issue seems to be related to this one: vercel/next.js#66162.
The fix will be in Next.js v14.3.0 when released

@tevass
Copy link

tevass commented Jun 11, 2024

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.

@sawa-ko
Copy link
Author

sawa-ko commented Jun 11, 2024

@tevass I can confirm that using the version you say works fine again.

@emulienfou
Copy link

I can also confirm that 5.0.0-beta.19 is introducing issue with next@15.0.0-canary and react@19.0.0-rc.
Downgrading to 5.0.0-beta.18 is also fixing the issue with Turbo!

@bgolubovic
Copy link

I can also confirm that 5.0.0-beta.19 is introducing issue with next@15.0.0-canary and react@19.0.0-rc.
Downgrading to 5.0.0-beta.18 is 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'

@MarkLyck
Copy link

MarkLyck commented Jul 3, 2024

Thanks for posting this. I also had this error on 5.0.0-beta.19. Downgrading to 5.0.0-beta.18 fixed it 👍

@balazsorban44 balazsorban44 added upstream The issue dervies from one of next-auth dependencies and removed triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime. labels Jul 8, 2024
@ZinhleBu
Copy link

Im also getting this error. Downgrading to 5.0.0-beta.18 fixed my issue.

@aianddeng
Copy link

5.0.0-beta.20 not fixed, sad

@essuraj
Copy link

essuraj commented Jul 31, 2024

this bug is breaking login, rolling back to beta 18. still broken in beta 20

@balazsorban44
Copy link
Member

Hi folks, I did some digging here! See #11551 for the solution/explanation. A fix will be out in the next release!

@luisalrp
Copy link
Contributor

luisalrp commented Sep 3, 2024

downgrading to 5.0.0-beta.18 worked in dev. Build still breaks. Did somebody build properly? Thanks!

@brycefranzen
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream The issue dervies from one of next-auth dependencies
Projects
None yet
Development

Successfully merging a pull request may close this issue.