NextJS is a framework that I've been using for a few years now. I've used it at work, for personal projects, and for an open-source organisation. As a framework, I love it; it combines React with server rendering in a performant and easy to write way. In terms of deployment, though, I've never felt a NextJS site was "stable".

Vendor-locking frameworks

My biggest issue with NextJS is that it feels incredibly vendor-locked into their hosting platform. For simple static sites, this isn't an issue. You can take the compiled output and throw it onto any server or even cloud storage host, just like any other static HTML/JS/CSS website. When it comes to the server components, however, it starts to become a bit more complex. NextJS is not exactly simple to deploy to serverless platforms while retaining a complete feature set.

NextJS and other hosting providers

In the past, I've deployed NextJS apps with server-side code to both AWS Lambda and Google App Engine, both with significant drawbacks. In both cases, static resource requests hit the server, and features such as Incremental Static Regeneration were either unavailable or severely limited. However, with Google App Engine, I actually did have ISR working, just without sharing between instances and requiring the experiment flag sprFlushToDisk set to false to work around the read-only filesystem. It would theoretically be possible to set up a system that uses cloud storage, but this would require a deep understanding of the internals of NextJS, a significant development investment, as well as higher cost.

Is it reasonable?

In saying this, Vercel/NextJS is a company that needs to turn a profit. Locking features behind a paywall is standard behaviour, but these features are inside the open-source NextJS project, not the Vercel hosting platform. In contrast with another React framework, Gatsby has incremental builds provided by their paid build service. This feature is part of Gatsby Cloud, not a part of the Gatsby open source project, and is thus never advertised alongside the open-source project. For NextJS, it is slightly different as the feature works if you run it on a traditional server, but not being aware of how restricted your hosting options are until you've written an application can be very problematic.

Vercel (the hosting service)

So yesterday, I decided to try moving over the websites for the open-source organisation I work with to Vercel. We'd previously been on Google App Engine with a few hacks in place to get it working and wanted to see how Vercel would perform. The key benefits were not needing the hacks, having proper incremental static regeneration, and deploy previews without any infrastructure setup. On paper, Vercel is an excellent managed service that provides one-click deployments with previews. I've found a few pretty significant shortcomings in my short evaluation, but overall, I feel I'll stick with the service.

Shortcomings

When I first started to evaluate Vercel, I created a branch on the repo with the changes that removed the hacks for Google App Engine and made a few changes to suit Vercel better. I then created the project on the Vercel site and discovered that it wouldn't let you modify the branch in the onboarding flow. Not only that, but if the build fails, it deletes your project. What followed was a reasonably frustrating time of me trying to find a workaround. Eventually, I discovered I could open the full settings in a second tab, set it to use the correct branch, then push a commit to the new branch before the original build had finished.

After I'd successfully travelled through the seven layers of hell to get the project created, I discovered that Vercel didn't support Git LFS. No Git LFS wasn't as big a deal as I could manually install it via the system's package manager in the install steps, but it really makes the product look immature. Git LFS for media assets is ridiculously common on more professional web projects, and not supporting such a common feature indicates they haven't dealt with many corporate customers. I trialled Gatsby Cloud at work during its first week of beta availability, and this feature was noted and fixed before the first week was up. Vercel has existed for years and still hasn't added support for it.

Conclusion

Okay, I understand I'm a bit overly harsh in this post. NextJS is just a project that I love working with, and honestly, it's hard for me to be confident in it when nothing I've encountered is as smooth as it could be. Especially now that Vercel has raised Series C funding, I'd expect the platform to be starting to mature. I'm not calling Vercel and NextJS awful products; I feel they're great products. It just saddens me that I can't solidly recommend them for anything serious.

About the Author

Maddy Miller

Hi, I'm Maddy Miller, a Senior Software Engineer at Clipchamp at Microsoft. In my spare time I love writing articles, and I also develop the Minecraft mods WorldEdit, WorldGuard, and CraftBook. My opinions are my own and do not represent those of my employer in any capacity.