Skip to content
Advertisement

Error! Command “npm run build” exited with 1, while deploying a website using vercel command

I am trying to deploy a website on vercel from my command line of VSCode by using the command:

JavaScript

When I execute this command, I get this output: error output

If I run:

JavaScript

I get the output as follow:

JavaScript

Now, just to say that I tried solving the warnings, I ran:

JavaScript

to install the latest uuid version, so that I can bypass the first warning. But It didn’t helped either. I again executed vercel command, and there were similar logs.

I tried to override the build settings to CI=False on vercel, under the project settings, but still didn’t got any successful response.

My package.json looks like this:

JavaScript

.eslintrc.json looks like this:

JavaScript

Link to my full github repository where I am holding this code is: Github repo

Kindly please help me out, what should I do.

P.S:- Everything is working very smoothly on my localhost:3000, and there are not bugs on it. I have ran the npm run dev several times on my terminal now, but there are no complaints on the localhost.

Advertisement

Answer

There are 2 ways to fix this problem.

  1. It seems that you are importing modules to some js files but not using them so avoid using unnecessary imports and only import a module when you are using it on the page. If you are not using it then avoid importing that module to the js file.

  1. Install the following module npm install --save-dev eslint-plugin-react. (for developers using NPM) or yarn add --dev eslint-plugin-react. (for developers using Yarn)

    Then, in your .eslintrc.json, under extends, include the following plugin:

    JavaScript

Hopefully, your error will resolve if you use any of this up suggestions

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement