Npm run build fails exited with status code 1

I have been running circleci for the first time and configured the file to build my static react app in s3 bucket. But the npm run build is failing with status code 1. I do not understand the problem since it is running perfectly in local machine. very much frustrated. If any one can help it would be great.
jobs:
build_deploy:
machine:
image: ubuntu-2004:202010-01
steps:
- checkout
- run:
name: Installing AWS CLI
command: |
sudo apt-get update
sudo apt install python3-pip
sudo pip3 install awsebcli --upgrade
- run: npm install && npm run build
- run: aws s3 sync build/ s3://exampleapp --delete

  workflows:
    version: 2
    execute_bulk:
      jobs:
        - build_deploy

Hi @Sriharshak95,

Welcome to Discuss and thanks for providing these details!

Looking at your config file nothing is standing out as a root cause here, so to investigate further we would need a link to a failing build to take a closer look. If you don’t feel comfortable posting here publicly, you can submit a support request and mention this post and we will take a look.

Unrelated but wanted to mention it, you can likely streamline your config a bit by utilizing orbs. We have an AWS CLI orb that allows for easy installation of the CLI.

Thanks!