I have a working build on the preview (off of my dev branch) and it consistently works. Prod had an issue at some point and seems to have consistently failed webpack builds all day long. Is there a way to completely wipe the build, environment, cache, etc of that line and rebuild entirely?
I’m uncertain what could cause that to fail when I’ve attempted removing the github integration, re-adding, manually building, promoting, etc.
So far, I get vercel failures on the prod instance deploy only and repeatedly. I will keep trying things from my side, but was hoping there was something I could do to wipe and re-make the production instance altogether without it’s long history of failures and any caching or settings that it may have somehow corrupted.
I’m currently working on a personal project have posted to GitHub and I have the vercel URL of the site.
But I was having a problem with an error called “404” not found then I added the vercel.json to my code and re push to GitHub after the pish I went to vercel to confirm my deployment then I saw an error called failed deployments.
Yeah, I’ve tried pushing with and without the vercel.json. It is odd since the preview one works so flawlessly while the production one just fails to do webpack builds. I’ve tried narrowing down versions, adding more explicit versions to the locks including the pnpm commands, etc. All to no avail.
Hey @jbmichael890 and @mdostal. I don’t have enough info here to say for sure what’s wrong, but we have a page with some tips for troubleshooting build errors. Can you try the tips in this guide and let me know if that solves the problem?
Yeah, I’ve gone through these steps as well as basically everything the AI assistant tried to help with.
I changed the branches the builds were bound to at some point and I have a suspicion some part of the overall build for prod is different than the overall build for preview due to that.
Production seems to have missing modules and imports while preview seems to build fine. I assumed force would kill off the cache and that would enable a bypass, but that has not seemed to be the case.
You can force a fresh build with a cleared build cache using the CLI: vercel deploy
The command would be vercel --prod --force to force a new production deployment without the build cache. Please give that a try for a production build and let me know if it helps.
I’ve tried that a few times and prod still will not build. Preview is chugging along and I don’t plan to be going full live for a couple of months, but ideally I would like to be able to get the preview build to go live as well.
I get the same error as promoting or running the build. It fails to import the modules that work when doing the build against the preview/dev environment / build local etc. The imports also are all part of the project and not part external dependencies. I’m wondering if the prod environment somehow has a different run than the preview/dev and is skipping config files or if the force is not deleting the full prior .next filestructure or something.
I thought it could be falling back to npm instead of pnpm but it lists pnpm in the build steps, same as the preview environment off the dev branch
I created a new project on vercel using the same github repo, same branch, and redeployed it. It works on the new application. So now I have one application purely for preview and another for production.
I will slowly migrate my settings, URLs, etc. from the non-working preview only site to the one that can do production builds.
No code changed, yet the prod build still fails on my original site and works completely fine on a brand new vercel project linked up.