Vercel — No Serverless Pages Built 🧐

I recently needed to upgrade a project in NextJS to a later "stable" version, one that has the pages, components etc, in a src folder. I also wanted to get Tailwind Setup up, so it was quite a big update.

All was going well locally, no issues at all. I repeat, no issues at all.

Once the site was ready, to go live I pushed to the main branch for auto deployment to kick in on Vercel. Ping. I get an email informing me that the build failed.

When I go to check it out, I get the following error:

Error: No Serverless Pages Built

Hmmmm. That's odd, it worked fine on my local....

Thankfully, there is helpful link at the bottom of the build log, relating to the error. Except it's not helpful at all.

I spend a little time going in circles scratching my head. A few hours of googling later, I stumble on this thread. Which, to put it in a nutshell, says its a problem with the version of NextJs being used 🤯 Ah crap.

Thankfully there was a solution. Simply installing next@canary fixed the issue.

So, if you're going through this same scenario, try installing the node module, it may just be the solution you're looking for.

;