[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[Help](/c/help/9)

# Build error

149 views · 0 likes · 2 posts


Umarfaroukpa (@umarfaroukpa) · 2024-08-15

<!-- Be sure to include all detail needed to let others see the same problem -->

i wanted to deploy my nextjs app,  I run npm  build and completed successfully locally,
but building with vercel is giving this error 'Error: Command "npm run build" exited with 1'


Amy Egan (@amyegan) · 2024-08-15

Hi @umarfaroukpa. If you expand the [build log](https://vercel.com/docs/deployments/logs) then you should see more details about what caused the error. 

Another trick I like to use is comparing the deployment build against a local build with the [CLI](https://vercel.com/docs/cli) `vercel build` command. If the local build is successful then the problem might be caused by a missing dependency or environment variable. If the local build also fails, then there might be a problem with project configuration, a typo in the code, or some other problem in the repo.