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.
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
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.
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!
@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.
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.