Next JS Hosting: Why I moved my website from AWS to Vercel

Hey everyone

This last week I’ve been working here on my website. This may not have been the brightest thing I’ve ever done, but I’ve been using it to test the new app/ directory in NextJS 13.

When you do so, Next JS quickly warns you that the app/directory is still in beta, unstable, and liable to change.

And let’s say… that is not an exaggeration.

Generally speaking, I usually host everything I do on AWS because I like how fast they innovate, and they tend to be cheaper than other options for projects that don’t have much traffic.

And AWS has set up an excellent integration with Next JS using their Amplify service. Honestly, it’s painless to set up. They take guide you through the process. You plug it into a GitHub repository. Amplify updates the environment whenever you push code to the main branch. I was impressed with how seamless it was.

And you can set up different environments. For example, I set up a preproduction environment to test changes before pushing them into production.

And it was a good thing I did: I had recurring bugs when navigating — particularly when returning from a page. I’d hoped the new Next 13.3 release would solve the problem.

Boy, was I wrong!

The 13.3 release introduced a whole slew of new bugs. From the outside, it feels like many of those bugs were linked to “Jest Workers” … at least, that was what the crashes were saying in my local development environment and the Amplify logs.

When I went to GitHub to see if there were any fixes or workarounds, I found out I was not the only one to be confronted with the problem. One user even said that the 13.3 was the buggiest release he had seen in a while.

Now because I was also fixing bugs on the website (linked to how it combined French and English), I couldn’t wait for the bug to be fixed.

And so, I decided to try hosting the website on Vercel, which finances Next JS. Not because Vercel provided a better experience. But because it felt like deploying on Vercel might have been better tested. And the experience on Vercel was very much comparable to that on AWS. Deploying is just as seamless. And the website didn’t have as many bugs.

Now, this move wasn’t because Vercel was better or cheaper. It was because Next JS 13.3 introduced instabilities that broke both my local environment and Amplify on AWS. So I have two pieces of advice for you today.

First: don’t use the app/directory in production for anything requiring a high level of stability. It’s okay for hobby sites but not ready to be used professionally.

Second: even for hobby sites, if you don’t want to use Vercel hosting, don’t use the app/directory just yet.

I’m having a lot of fun in Next JS 13 using React as a backend solution with Server Components. However, it requires a bit of a mindset shift. For example, there are no hooks on the server.

And above all, it’s not yet ready for prime time, not quite yet.

But I’ll be elated when it is (and that moment is coming soon). Because using the component mindset on the server, with data flowing down the tree from the layout, to pages, to components and finally to the client… I find that changes quite a few things from what we’ve been used to up until now.

So watch this space, and I’ll see you … on my website or in the next video!

Sign up to our newsletter

We help you better understand software development. Receive the latest blog posts, videos, insights and news from the frontlines of web development

We respect your privacy. Unsubscribe at any time.

Social
Made by kodaps · All rights reserved.
© 2024