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

broken build #9

Open
kasir-barati opened this issue May 14, 2024 · 0 comments
Open

broken build #9

kasir-barati opened this issue May 14, 2024 · 0 comments
Labels
bug Something isn't working DX

Comments

@kasir-barati
Copy link

Hi,

I've followed this tut step by step and literally just copied and pasted codes: https://fusionauth.io/docs/quickstarts/quickstart-javascript-nextjs-web

Besides Nx, and exporting it as standalone nothing else is different, however when I tried to build the app it throw this error at me:

$ nx build nextjs-fusionauth

> nx run nextjs-fusionauth:build

> next build

   ▲ Next.js 14.0.4

 ✓ Creating an optimized production build    
 ✓ Compiled successfully
   Skipping linting
   Checking validity of types  ...Failed to compile.

src/app/api/auth/[...nextauth]/route.ts
Type error: Route "src/app/api/auth/[...nextauth]/route.ts" does not match the required types of a Next.js Route.
  "authOptions" is not a valid Route export field.

Warning: command "next build" exited with non-zero status code
——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 NX   Ran target build for project nextjs-fusionauth (5s)

   ✖  1/1 failed
   ✔  0/1 succeeded [0 read from cache]

Reproduce it

  1. Clone this repo: https://github.com/kasir-barati/nextjs-fusionauth
  2. cd nextjs-fusionauth
  3. npm ci
  4. npx nx build nextjs-fusionauth

Any comment?

BTW I am trying to use FusionAuth as my OAuth provider in my fullstack app (NextJS + NestJS), although it seems like I am hitting a lot of wall breaks along the way as you can see it here: https://fusionauth.io/community/forum/topic/2679/nextjs-custom-backend-nestjs

First I was trying to use @fusionauth/react-sdk but then I ended up with a broken build so I tried to read docs and realized that you have implemented it with NextJS a little different than what I was doing and TBF it look nicer too. So, yup, that was the back story 😅.

@linear linear bot added bug Something isn't working DX labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working DX
Projects
None yet
Development

No branches or pull requests

1 participant