Joint session with Vercel: How to build intelligent storefronts (May 15th)

Deploying Next.js Landing Page Sample on Netlify - Errors

19 repliesLast updated: Nov 29, 2025

Hi! I'm trying Sanity for the first time but the Next.js Landing page sample site had problems deploying on netlify and I really need some help.
AI Update

I understand you're having trouble deploying the Sanity Next.js Landing Page template on Netlify! This is a common issue, and there are several typical problems that come up with this setup. Let me help you troubleshoot.

Common Deployment Issues with the Next.js Landing Page Template on Netlify

Based on the landing page template guide, here are the most common issues and solutions:

1. Build Settings Configuration

For Next.js on Netlify, you need to ensure your build settings are correct:

2. Monorepo Structure Issues

The sanity-template-nextjs-landing-pages uses a monorepo structure with both the Studio and the web frontend:

You might need to set up two separate Netlify sites - one for the Studio and one for the frontend. When Netlify builds from the repository, it needs to know which part to deploy.

3. Environment Variables

Make sure you've configured these environment variables in Netlify (under Site settings → Environment variables):

4. Next.js Runtime Plugin

For modern Next.js versions (13.5+), Netlify requires the @netlify/plugin-nextjs plugin. This should be automatically detected, but if not, add a netlify.toml file to your project root:

[[plugins]]
  package = "@netlify/plugin-nextjs"

5. Build Command for Monorepo

If you're deploying the web frontend from the root of a monorepo, your build settings should be:

Quick Fix Steps

Specific Error Messages to Watch For

Without knowing your exact error, here are the most common ones:

Additional Resources

If you're still having issues after trying these steps, it would be helpful to know:

Feel free to share those details and I can provide more targeted help!

Show original thread
19 replies

Was this answer helpful?

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Related contributions