next-auth icon indicating copy to clipboard operation
next-auth copied to clipboard

Api auth path error when using with turbopack

Open sawa-ko opened this issue 1 year ago • 5 comments
trafficstars

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

  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 avatar Jun 10 '24 15:06 sawa-ko

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

emulienfou avatar Jun 10 '24 17:06 emulienfou

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 avatar Jun 11 '24 13:06 tevass

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

sawa-ko avatar Jun 11 '24 14:06 sawa-ko

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!

emulienfou avatar Jun 13 '24 13:06 emulienfou

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!

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'

bgolubovic avatar Jun 18 '24 09:06 bgolubovic

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

MarkLyck avatar Jul 03 '24 01:07 MarkLyck

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

ZinhleBu avatar Jul 26 '24 18:07 ZinhleBu

5.0.0-beta.20 not fixed, sad

aianddeng avatar Jul 29 '24 10:07 aianddeng

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

essuraj avatar Jul 31 '24 06:07 essuraj

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

balazsorban44 avatar Aug 08 '24 19:08 balazsorban44

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

luisalrp avatar Sep 03 '24 11:09 luisalrp

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.

brycefranzen avatar Sep 09 '24 15:09 brycefranzen