Build error

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’

Hi @umarfaroukpa. If you expand the build log 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 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.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.