Error while deploying

I have an issue with my deployment.
I have a “build.command” failed
Error message
7:23:48 PM: Command failed with exit code 1: npm run build
7:23:48 PM: ​
7:23:48 PM: Error location
7:23:48 PM: In Build command from Netlify app:
7:23:48 PM: npm run build

This is my script page on my vs code. I believe there is issues with my script but not sure where i went wrong

Not sure if you can see the images. Let me know how to resolve this issue. Thank you

Welcome to the forums @SAK

Can you share the link to the full deploy log and the repository you are deploying from.

Deploy log:


The package.json in the root of the repository does not have react-scripts as a dependency.

I might assume you are trying to deploy the frontend? If so, you need to set the Base directory to frontend and the publish directory to frontend/build.

This would be my root package. is this correct?

As previously mentioned react-scripts does not exist as a dependency in the package.json at the root of the repository hence the error you have seen.

There are two directories in the repository: backend and frontend. If you are deploying the frontend directory, you need to change the build settings as previously described.

More specifically, these (I believe) are the build settings you require