Next.js Discord

Discord Forum

Failed to Deploy Vercel (No Errors Given), how to figure out why?

Answered
Band-tailed Gull posted this in #help-forum
Open in Discord
Band-tailed GullOP
Hi, I am attempting to deploy a next app to vercel for the first time, so forgive me if there is something that I'm doing very wrong here.

I keep getting Build Failed
Your deployment's build step did not complete within the maximum of 45 minutes

But the logs show nothing indicating why, I have no errors or warnings. It builds fine (from what I can see) on my local device as well.

Here are the vercel logs (will attach in 2nd message, and will include logs on local as well)
Answered by Giant panda
Your build command seems to be next dev instead of next build
View full answer

18 Replies

Band-tailed GullOP
Here are my vercel deployment logs...

[14:22:28.359] Running build in San Francisco, USA (West) – sfo1
[14:22:28.408] Cloning github.com/korbinschulz/personal_site (Branch: main, Commit: 108a9f1)
[14:22:28.525] Previous build cache not available
[14:22:29.032] Cloning completed: 623.537ms
[14:22:29.175] Running "vercel build"
[14:22:29.627] Vercel CLI 31.2.3
[14:22:29.827] Installing dependencies...
[14:22:36.327] 
[14:22:36.327] added 308 packages in 6s
[14:22:36.327] 
[14:22:36.327] 124 packages are looking for funding
[14:22:36.327]   run `npm fund` for details
[14:22:36.344] Detected Next.js version: 13.4.12
[14:22:36.345] Running "npm run dev"
[14:22:36.662] 
[14:22:36.662] > korbinschulz@0.1.0 dev
[14:22:36.662] > next dev
[14:22:36.662] 
[14:22:36.714] - warn You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env
[14:22:36.922] - ready started server on 0.0.0.0:3000, url: http://localhost:3000
[14:22:37.454] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[14:22:37.455] This information is used to shape Next.js' roadmap and prioritize features.
[14:22:37.455] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
[14:22:37.455] https://nextjs.org/telemetry
[14:22:37.455] 
[14:22:39.102] - event compiled client and server successfully in 184 ms (20 modules)
[14:22:39.318] - wait compiling...
[14:22:39.506] - event compiled client and server successfully in 129 ms (20 modules)
Logs from local...

- info Generating static pages (9/9)
- info Finalizing page optimization  

Route (app)                                Size     First Load JS
┌ ○ /                                      294 B          83.5 kB
├ ○ /api/spotify/now-playing               0 B                0 B
├ ○ /api/spotify/top-artists               0 B                0 B
├ ○ /api/spotify/top-tracks                0 B                0 B
├ ○ /experience                            379 B          78.6 kB
├ ○ /music                                 6.05 kB        89.2 kB
â”” â—‹ /projects                              328 B          78.5 kB
+ First Load JS shared by all              78.2 kB
  ├ chunks/596-d673339cbc0d8a2a.js         25.7 kB
  ├ chunks/fd9d1056-1beea2eb69e7609b.js    50.5 kB
  ├ chunks/main-app-10b2848dadcd6d30.js    214 B
  â”” chunks/webpack-61090644ca7de56c.js     1.77 kB

Route (pages)                              Size     First Load JS
─ ○ /404                                   182 B          75.8 kB
+ First Load JS shared by all              75.6 kB
  ├ chunks/framework-8883d1e9be70c3da.js   45 kB
  ├ chunks/main-d065b95b473b114f.js        28.6 kB
  ├ chunks/pages/_app-52924524f99094ab.js  195 B
  â”” chunks/webpack-61090644ca7de56c.js     1.77 kB

â—‹  (Static)  automatically rendered as static HTML (uses no initial props)

korbinschulz@Korbins-MacBook-Pro korbinschulz % npm run start

> korbinschulz@0.1.0 start
> next start

- ready started server on 0.0.0.0:3000, url: http://localhost:3000
- info Loaded env from /Users/korbinschulz/Desktop/korbinschulz/.env


Everything loads correctly here, and i can't figure out why its having issues when im attempting to deploy to vercel 🤯 Any help, advice, or anything of that nature will be greatly appreciated!
Giant panda
Your build command seems to be next dev instead of next build
Answer
Giant panda
Did you override it?
In the CI you are starting the dev server which doesn't build and doesn't exit at the moment
@Giant panda Your build command seems to be `next dev` instead of `next build`
Band-tailed GullOP
are u getting this from the vercel logs or the local ones? i dont recall overriding, but ill double check
also ty for helping me out with this, i really appreciate it fam
@Giant panda In the CI you are starting the dev server which doesn't build and doesn't exit at the moment
Band-tailed GullOP
what does CI mean in this context btw, forgive me for being a noob 💀
Giant panda
The Vercel logs output is the common dev server output and it shows Running "npm run dev"
Thus it's clear that it doesn't run the actual build command
Band-tailed GullOP
ah shit im dumb as hell, seems i did override it lmfao
Giant panda
and CI stands for Continuous Integration which is typically one term in the context of automated build pipelines
Band-tailed GullOP
ohhhh gotcha, appreciate it man. any other glaringly obvious mistakes that you can see in there as of now?
ah here we go, seems that resolved my issues cuz now im getting a different error but i was alr anticipating that cuz i need to change the callback url and shit in my env variables 🫡

gonna get to work on those now, thank you so much for your help, it wouldve taken me an embarassing amount of time to find that! should i close this now, or is there a certain procedure im supposed to follow for this?
Band-tailed GullOP
great, and then after marking solution would i close this or simply keep it open after that?
Giant panda
Nothing else to do
Band-tailed GullOP
great, thank you again boss i really appreciate you taking the time to help out 🫡