NextJs + Kinde SDK 2.2.3 deployment on vercel failed
I tried to deploy my application on vercel. I'm using Nextjs version "14.0.4" and Kinde version 2.2.3. What's weird is that when I try to build locally it works.

16 Replies
you may want to try the nextjs sdk instead of the typescript sdk!
I am using the NextJs sdk
"@kinde-oss/kinde-auth-nextjs": "^2.2.3",
Now that you mention it. It says in the logs typescript-sdk. What ???
that's what I picked up on, maybe the nextjs sdk uses the typescript one internally?
I'm using the nextjs sdk now without issue though, on vercel, so I can at least confirm its working
@IkiTg07 you might find information here to help you get deployment on Vercel
https://kinde.com/blog/engineering/deploy-a-kinde-app-on-vercel/
https://youtu.be/ZNuE7CkB6ck?si=mOZ872cPXOC7fKJm
@Jeremy you are correct, most of our JS SDK use the TS SDK under the hood
Kinde Blog
Deploy a Kinde app on Vercel
This guide covers everything you could need to deploy a Kinde app to Vercel.
Kinde
YouTube
How to deploy a Kinde Next.js app with Vercel
Software engineer Peter takes you through how to deploy a Kinde app using Vercel, and covers the common pitfalls involved.
00:00 - App demo
0:46 - Creating a project on Vercel
1:19 - Initialising Github repo
2:49 - Setting up environment variables on Vercel
4:00 - Deploying and visiting the app on the Vercel Domain
5:13 - Updating environment ...
Yeah it was working fine for me too. And again on my local machine I was able to build with no issue
@Jeremy Which version of the SDK are you using ?
I'm on latest
Same for me. That’s weird :/
perhaps see if you can deploy this: https://github.com/kinde-starter-kits/kinde-nextjs-app-router-starter-kit
GitHub
GitHub - kinde-starter-kits/kinde-nextjs-app-router-starter-kit: Ki...
Kinde NextJS SDK with full App Router support. Contribute to kinde-starter-kits/kinde-nextjs-app-router-starter-kit development by creating an account on GitHub.
Hi @IkiTg07 , This is indeed strange why your deployment is not workiing. Could you let me know what package manager you're using incase there is a nuance there
I'm using bun as a package manager
This is weird in my vercel dashboard for that project I manually added the command to build and now it's working

Interesting, I wonder if there is a nuance when using bun package manager here. Thanks for letting us know you got it working.
Weirder now I tried to make a PR and build for prod and at first it crashed but I then redeployed and it's working. I'm guessing even if I were to unset the build command and let vercel do its thing it will work the second time... I'm lost haha

The build logs from the failed builds are the ones above?
yes