Fixing Vercel build error with Got using Next.js 13+
Using Got by Sindre Sorhus with Next.js causes a build error on Vercel. The fix is simple.
Are your Vercel builds failing when you're trying to use got by Sindre Sorhus with Next.js 13 or 14?
Maybe you've stumbled upon this GitHub issue and looked for a solution but got confused with people's answers.
The fix is pretty simple.
- Go to your project settings on Vercel
- Scroll down to the
Node.js Versionsection and select 20.x
- Add a
got.d.tsfile to your project's root.
That should do the trick. Your Vercel builds will work again.