Welcome to the Kinde community

Updated 7 months ago

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.
Attachment
image.png
2
J
S
I
21 comments
you may want to try the nextjs sdk instead of the typescript sdk!
make sure you use the Next.JS SDK as listed in the Kinde Quick Start guide for Next.js
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
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 :/
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
Attachment
image.png
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?
Add a reply
Sign up and join the conversation on Discord