🚀Build failed (deploy failed)
Error: Command "npm run build" exited with 1
An error happened in the "packing up" (build) step before your site goes live, so the deploy stopped. The real cause is in the log above this line.
🤔 Why does it happen?
- There's a type error or syntax error (the dev server may let it slide, but the build stops on it)
- Environment variables are missing from the deploy settings
- The code uses a package that isn't installed
🔧 Try this
- Find 'Error' or the red lines in the deploy log and read around them
- Run npm run build on your own computer and see if you get the same error
- Copy the whole error part of the log and show it to the AI
🤖 Ask your AI like this
My build fails when I deploy. Please look at the build log below, find the real cause, and fix it. Also tell me how to check it on my computer with npm run build afterward. [Paste the build log here]
Replace the [ ] parts with your own situation, and paste the error with a few extra lines before and after it.
Related terms
Other errors in this group
- Missing environment variable
Missing environment variable - Wrong API key
Invalid API key - Timed out (504 Timeout)
504 Gateway Timeout - Domain not found (DNS)
DNS_PROBE_FINISHED_NXDOMAIN - Secure connection error (SSL certificate)
Your connection is not private - Deployed site shows 404 (Vercel NOT_FOUND)
404: NOT_FOUND (Vercel) - Server function failed to run (FUNCTION_INVOCATION_FAILED)
500: FUNCTION_INVOCATION_FAILED - Environment variable is undefined in the browser
process.env 값이 브라우저에서 undefined - Only a white screen after deploying
배포했더니 흰 화면만 나와요