Create Next App Next 14 Build Error
When generating a new app with the create next app command
npx create-next-app@latest -e with-supabase
, there are multiple build errors when running next build
. Errors below
12 Replies
Supabase
Supabase is now compatible with Next.js 14
The fastest way to build apps with Next.js 14 and Supabase
must be something wrong with the
create
script because ive updated all my dependencies to the latest versions (nextjs is on 14, and supabase is on 2.38.4) and everything works. granted ive had this project working before next 14Possibly.. but I have the same setup as you.. updated my dependecies in my project to the latest versions (next14, supabase ssr, etc) and I am still seeing the error. I pulled down the template and ran it to try and see if it was my setup or the template
It's strange to me the supabase team would push all of this and not even try to test if
next build
runs without error
I'm currently on:
what about you @Corrupted ?oh, im not using
@supabase/ssr
i have not attempted to use it because things are working for me already how i want them to. i have seen lots of people having issues with the ssr
package though.
but here are the versions im on anyway
ahh gotcha. They were pushing their new ssr package and deprecated the auth-helpers-nextjs lib so i figured i would give it a try.
if you're starting new and just want to get things started, i would start with the auth-helpers and when the kinks are ironed out in the SSR, then upgrade to it with their migration guide.
auth-helpers
was pretty easy to setup and use, so thats why im still using itSupabase Auth with the Next.js App Router<!-- --> | Supabase Docs
Authentication and Authorization helpers for creating an authenticated Supabase client with the Next.js 13 App Router.
I'm not starting new, i've had the auth-helpers lib working in my repo's for a while.. just wanted to try the ssr/next14 setup
appreciate the link though
ah okay, gotcha. np!
ironically, the project does compile with next build when deployed to vercel. must be a nextjs issue
I'm having the hardest time getting supabase Auth to work in next JS. I can get login/logout working but passing cookies seems too complicated.