Next.js Discord

Discord Forum

Problem deploying project on vercel as per chapter 6 of the tutorial

Answered
Pyrenean Mountain Dog posted this in #help-forum
Open in Discord
Pyrenean Mountain DogOP
Chapter 6 of the nextjs tutorial has us deploy the project: https://nextjs.org/learn/dashboard-app/setting-up-your-database#connect-and-deploy-your-project

Since I had an issue in a previous attempt I created the respository in gitlab and have pushed commits for each of chapters 1 - 5 (inclusive) prior to reaching chapter 6 again. There are no problems shown in vscode and everything works fine locally but I did get a build error in vercel immediately after creating the project there (the build runs automatically upon creation of the project). I had also stopped builds from running during this time by selecting Don't build anything in Setting > Git > [Ignored Build Step section]. I changed the setting to in vercel [Ignored Build Step section] to Only build preview then selected the Deployments tab, clicked the deployment listed, and then clicked the "Redeploy" button. The build seemed to be proceeding without error but then I got a message telling me the build had been canceled. The content at the link "View Build Status" that is given says this..

The Deployment has been canceled as a result of running the command defined in the "Ignored Build Step" setting.


I don't know what I'm supposed to do to correct the situation and get a successful build and it seems this is a barrier (blocking condition) to proceeding with the tutorial any further. Can anyone assist me in getting this straightened out?

By the way I did look at the [Ignored Build Step](https://vercel.com/docs/projects/overview#ignored-build-step) documentation but I can not identify what the problem is with my current setting. There must be something I'm not seeing.
Answered by Pyrenean Mountain Dog
STuck on failed build which prevents me from continuing in the tutorial
View full answer

6 Replies

Pyrenean Mountain DogOP
To clarify.. although a person would not typically create their repository online (gitlab in my case) until later in the tutorial (after completing the first 5 chapters) I knew it was coming and that I had had a problem the first time I ran though the chapters up to chapter 6. Since I had encountered a problem and had to start over with a clean nextjs project and from the beginning of the tutorial I chose to create my repository in gitlab and project in vercel right after creating the fresh nextjs project locally (chapter 1 of the tutorial). It was at that time (immediately after importing my repo and creating the project in vercel) that I discovered build error in vercel (again). So I stopped builds and proceeded to rework chapters 1 - 5 of the tutorial locally. Now I have reached chapter 6 again; and, while it is not necessary to do that first 2 sections of that chapter (creating the online repository and project in vercel) - since I had already done so - I did pick back up in chapter 6 at the third section regarding deploying the project in vercel. Of course builds were still stopped as per the settings in vercel at the time. This is where I am at now and with the aformentioned description of trying to get builds in vercel configured correctly and get a successful build.
Pyrenean Mountain DogOP
I figured that out (I needed to deselect an option when redeploying) - but now the build fails. I don't know if the build fail is the same reason as before but this time it says..

Type error: Cannot find module '@/app/ui/fonts' or its corresponding type declarations.
There exists an app/ui/fonts.ts, there are no "problems" in my ide (vscode), and the application appears to work flawlessly in the browser resolving the project locally. What gives?
Pyrenean Mountain DogOP
The dam thing looks as if it is not using teh latest commit (even though the repo in gitlab is up to date and has it).
Isn't there a way to feed the build server the exact commit (commit hash) you want it to build?
Pyrenean Mountain DogOP
STuck on failed build which prevents me from continuing in the tutorial
Answer