Are there any Next.js Functionality Limitations when Deploying Next.js to Netlify?

22 replies
Last updated: Jun 14, 2021
Those of you that deploy Next to Netlify, are there any limitations to Next functionality or do they support it all by now?
AI Update

This question is about Netlify's Next.js support rather than Sanity functionality, so it's outside the scope of what I can help with here in the Sanity community.

For questions about Netlify's Next.js compatibility, limitations with App Router, Server Actions, or other Next.js features, I'd recommend:

  • Netlify's documentation: Their official Next.js runtime docs have the most current compatibility information
  • Netlify's community forums: Where you'll find people with direct deployment experience
  • Netlify support: They can provide authoritative answers about their platform capabilities

If you have questions about Sanity-specific aspects of your Next.js deployment—like setting up the Live Content API with Next.js loaders, configuring content previews, using Sanity Functions to trigger revalidation, or optimizing Sanity images with next-sanity—I'm happy to help with those! But for hosting platform capabilities and limitations, the platform's own resources will give you the most accurate and up-to-date information.

Nice that sounds great! I’ve been a Netlify user for ages but switched to Vercel since they didn’t fully support Next back then. But I have to say I’ve missed it. Vercel is alright, but imo Netlify takes the price.
What is it you prefer with Netlify? I've kinda gone the other way and preferring Vercel 😄
😂 I don’t know, maybe I just find things easier in there. Could be habit. I played around with creating a team in Vercel, but it refuses to build if a non-team member pushes to one of the repos, essentially forcing an upgrade for another $20/m for each person that might contribute a line of code.
I don’t know if Netlify does the same, I haven’t managed teams there.

Another thing is the build/deploy hook trigger. With Vercel you have to create a token which gives full access to every project. Seems like a big security oversight when all you want to do is set up a deploy trigger in Sanity dashboard.
New members are paid in Netlify as well. I think it's $19/month.
Yeah, $19/m is what I saw as well. But does that mean if you have someone who’s not a team member commit to the repo Netlify will refuse to build?
I always used to think the team member thing was just about who needs to have access to vercel/netlify
I needed to actually give someone access to Netlify. Not sure how it works with builds.
ok, because I actually don’t want to give them access to vercel 😅 but I still want their commits to build
We use netlify, I only have one or two accounts set up for management reasons, the rest is via github
And there’s no issue with deploy when any non-netlify user pushes to the repo?
actually a good question but I honestly can’t imagine why they would do that, it’s a counter-productive security stance to make anyone who writes code be able to mess around with the CI stuff
seems like it’s all jsut github events to me
yeah, that’s what I remembered as well from back when I used Netlify. But we had small teams so I’m not 100% on that. Vercel does it that way and it really baffled me. I guess they want the $$$
backing up to the main question, it does seem to me like everything is fully supported now, we get functions deployed for ISR paths. They’re very actively developing the modern plugin for this too https://github.com/netlify/netlify-plugin-nextjs
yeah netlify charges me handily for all the excess build minutes and things too 😄 (trying to eliminate a lot of that with nextjs features)
That’s awesome! Do you have a good resource for setting up a Next project in Netlify?
I think netlify installs a nextjs essentials plugin automatically if it detects nextjs is being uses in the repo
I can accept paying for build minutes, it’s genuine usage. But yes, I do remember that cost. We had a Gatsby+Shopify site with 20k skus :mindblown:
Sweet! That’s amazing!
yeah we were running into issues with build pipelines timing out, and the problem only gets worse as time goes on, so next fixes much of that. And yes teh plugin is automatically installed (I’m moving over in a branch so had to include it manually while we’re co-deploying via gatsby and next right now. I don’t have any great references but one gotcha was that
devDependencies
are not present at all in a
NODE_ENV=production
build (I think I have that right). Was a bit confusing for me at first

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.

Was this answer helpful?