Vercel Deployment Issue - Endless Loop

Hi all,

I have been running a project on Vercel for several months with no issues. I have my repository connected to git, and whenever I have pushed to the main branch, it has built and configured on vercel just fine. About 4 days ago, I noticed a change in the vercel logs, and I am getting errors on the build because it loops over the dependency packages without stopping. I had changed nothing in the dependencies.

Old log screenshot:

New log screenshot:

It will continue looping in that fashion for 45 minutes until vercel times out. I don’t seem to be able to change the fact that it is using yarn, and I’m not sure why. I tried looking into the vercel build settings, but when you have a β€œbuilds” option in your vercel.json file it overrides them. So, because of @frontity/now, it overrides any build setting changes.

I have tried deleting the β€œbuilds” option from the vercel.json file, and then everthing builds correctly, but when I’m finished vercel gives a 404 because it can’t find anything in the build repository. I’ve tried changing the location to public, build, . , package.json, etc. Nothing seems to resolve correctly.

I’m hoping this is a simple fix on something I am missing, but my fear is that some change in vercel has caused the @frontity/now package to break the way it builds on their servers. I even attempted forking and cloning @frontity/now to attempt to resolve some of the dependecy issues that currently exist on that package (possible pull request incoming at a future date), but I still end up in the endless yarn loop.

Any help would be appreciated
github repository:

If you are going to respond with "update your own dependency tree,’ or β€œmake sure forntity is up to date” please be specific, as it is clear that frontity is not being maintained as it once was, and will require some love form the open source community. I’ve been trying to finish this project first before I dive into some of those issues.

DUDE I am so glad you posted this because I was about to make the same post. I have been struggling with it for 3 days now feeling insane. I have tried many things… finally I got it to β€œdeploy” by taking the

    "builds": [
        "src": "package.json",
        "use": "@frontity/now"

out of the vercel.json file and then changing the Build and Development settings to use β€˜build’ as the output directory and β€˜npx frontity build’ as the build command. But that screwed everything more because it deployed a bunk version and now my domain is showing Vercel’s 404 page.

My theory on this based on the errors I am seeing is that @ frontity/now having the unmet peer dependency @ now/build-utils is getting confused because it seems there is now a @ vercel/build-utils. Was the @ now/build-utils deprecated? I see that the repo for @ frontity/now (GitHub - frontity/now-builder: A Frontity builder for the Vercel hosting) has not been updated since July 2020.

Anyways, thanks gideonjb for making me feel less insane. I have exhausted my investigation and attempts at trying to fix this and now think it is not something that I can even fix and something to do with Frontity’s Vercel package.

Frontity peeps please reply because now my site is down indefinitely. I love Frontity and have been considering creating a new business around using Frontity for development for clients but this has me freaked out.

Hi @techno_cowgirl,

I first thought the main issue was coming out of @frontity/now as well. That’s why I forked it to try to resolve some of the deprecation warnings, but that still resulted in the same looping output from vercel using the β€œyarn add v1.22.17” command. @luisherranz may be able to chime in on how easy it would be to update @frontity/now to remove the deprecations and do a better job than me.

At this point, unfortunately, I think the problem is on the vercel side, and I haven’t heard back from them yet. Hoping to find a solution soon, because otherwise I have to switch hosting servers or completely rebuild. Neither of which are very appealing to me.

@techno_cowgirl is there anyway for you to roll back to a previous commit on your Git so that Vercel is using one that is working? It would get you back online for now.

@mckenna.niall I understand why you said that, intuitively you might think that is a solution. I tried it again just in case and to directly confirm it wouldn’t work and sure enough it failed again. This time I am getting the other error I was getting over the last couple of days, that I don’t have a public folder in my build folder. That is how I got in the whole mess of taking my site down… because I troubleshot that at some point and it β€œsuccessfully deployed” but went to the Vercel 404 page.

@gideonjb I’m at the same place as you both in terms of thinking it’s Vercel’s thing and being very unhappy about the prospect of switching to Heroku or something. Vercel was excellent when it worked!

There is a discussion on the Vercel github and I linked the PR I think might have broken it for us.

I don’t know if this is of any help but my vercel.json looks like this. I’ve recently been deploying my project to Vercel without problems.

@mckenna.niall how are you deploying your project? Are you issuing the build command directly form your CLI, or do you have a github repository connected to vercel that you are pushing to that triggers the vercel build?

I have both deployed via a push straight to github & also building the project first with the frontity build command & then a push to github.

I have noticed that Frontity handles it’s deployment to Vercel differently to how a Nextjs project is deployed to Vercel - Next requires a public directory inside it’s build directory. So it’s difficult to find any help online for deploying Frontity to Vercel as it’s all Nextjs specific.

Just to be clear, are you deploying your project using Vercel build command from the CLI ?

I have tried both ways, and both produce the same result.

Do you need to have vercel installed as a dependency?

Good news, everyone! I have a client’s site I’ve been building with Frontity but hadn’t yet hooked up to a WP install or connected to Vercel yet. I was curious to see what would happen if I took this virgin Frontity project and tried deploying it. To my surpise, it deployed from the command line. To greater surprise it also deployed from merging into main after connecting Vercel to the project’s github and merging a PR.

I was like okay this makes no sense, I have to try my stupid deploy ONE more time on my personal site I’ve been crying over for days. And it worked this time! MY SITE IS BACK!!!

I will check in with recent changes Vercel made but it looks like when things were broken Vercel was running vercel build and now it is back to running frontity build. I think it was treating Frontity projects like Next projects for about a week there. Again, a hypothesis, but objectively something has changed based on the build messages.

Going to check out the Vercel Github now, I would like to understand what happened this week.

The working build with frontity build command:

1 Like

The previous build with vercel build:

I can confirm the issue is resolved for now as well. Someone pushed a change for vercel builds. See the conversation here: