Constant Error: Command "npm run build" exited with 1

I have spent 3 days on this deployment issue. I seem to be getting this error no matter what i ask cursor/chatpgt/claude/youtube.

If anyone knows how I can rectify this Error: Command “npm run build” exited with 1 or whatever it might be hat would help a lot! I added a screenshot as I am not the best as explaining full context.

Hi @gaiuseli-gmailcom, welcome to the Vercel Community!

It looks like your code is not adhering to the eslint rules defined in your project.

I’d recommend you to read about Overview | typescript-eslint and try to fix the ones that come up in the error. For example, @typescript-eslint/no-unused-vars comes up when you have declared a variable but never used it.

You should consider using code editor plugins or extensions (ESLint - Visual Studio Marketplace) for eslint so that you see these errors/warnings actively when writing the code.

Hi @anshumanb thanks for you reply!

I have tried implementing everything you have told me. Nothing seems to work. I am still getting these errors I just dont know what to do.


Hi @gaiuseli-gmailcom, can you share what you did? These errors are all related to eslint, nothing specific to Vercel.

If you need more help, please share your public repo or a minimal reproducible example. That will let us all work together from the same code to figure out what’s going wrong.

Hey @anshumanb I downloaded the code editor plugins as you suggested and ran it into Cursor.

Then I went into the Overview Typescript document you linked. Found each corresponding error I dragged and dropped the solution into cursor and told it to implement the solution into each individual error.

Here is the public github gh repo clone GaiusEli/copyforabox

Hi @gaiuseli-gmailcom, I see. In your repo’s copyforabox/.eslintrc.json at main · GaiusEli/copyforabox · GitHub file, the rules are not disabled, which means Cursor didn’t do a good job. No worries. I’d recommend reading the Configure Rules - ESLint - Pluggable JavaScript Linter docs to see how you can turn off specific rules.

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