workos / authkit-nextjs

The WorkOS library for Next.js provides convenient helpers for authentication and session management using WorkOS & AuthKit with Next.js.
MIT License
44 stars 9 forks source link

Build Issue after migration: Identifier 'NextResponse' has already been declared #10

Closed k11kirky closed 3 months ago

k11kirky commented 3 months ago

Failed to compile. ./node_modules/@workos-inc/nextjs/dist/cjs/authkit-callback-route.js Module parse failed: Identifier 'NextResponse' has already been declared (3:6) File was processed with these loaders:

Import trace for requested module: ./node_modules/@workos-inc/nextjs/dist/cjs/authkit-callback-route.js ./node_modules/@workos-inc/nextjs/dist/cjs/index.js ./src/app/api/auth/callback/route.ts

Trying to migrate my nextjs app to using the new sessions funtionality rather than the implemented work os node implementation for next and am getting the above issue during build?

PaulAsjes commented 3 months ago

Hi there, can you share your exact steps to reproduce? Also helps if you let us know what version of Next and Node you're using.

k11kirky commented 3 months ago

"next": "13.4.4", node: 20.2.0

I cannot share the repo unfortunately. will try to reproduce today on a fresh repo and get back to you

PaulAsjes commented 3 months ago

Closing due to inactivity. Feel free to reopen with some reproduction steps if you're still experiencing this.