Can't find index.html after running yarn build in config.yaml

I’m trying to set up a CircleCI pipeline with my github repository.

config.yaml file:

version: 2.1
      aws-s3: circleci/aws-s3@1.0.11
                  - image: circleci/node:12.9.1-browsers

            - checkout

            - restore_cache:
                  - v1-dependencies-{{ checksum "package.json" }}
                  # fallback to using the latest cache if no exact match is found
                  - v1-dependencies-
            - run: yarn install

            - save_cache:
                  - node_modules
                  - ~/.npm
                  - ~/.cache
                  key: v1-dependencies-{{ checksum "package.json" }}

            #- run: yarn lint

            #- run: yarn size

            #- run: yarn test
            - run: pwd
            - run: yarn build

            - aws-s3/sync:
                  from: build
                  to: "s3://kriss-react-cicd/"
                  arguments: |
                        --acl public-read \
                        --cache-control "max-age=86400"
                  overwrite: true

yarn run v1.17.3
$ react-scripts build
Could not find a required file.
Name: index.html
Searched in: /home/circleci/project/public
error Command failed with exit code 1.
info Visit for documentation about this command.

I’ve tried setting a working_directory to different folders in the repository, but I still get the same error when the run: yarn build is executed.

Here is my directory:

d----- 11/03/2021 8:40 PM .circleci
d----- 11/03/2021 10:29 AM .github
d----- 8/03/2021 11:08 PM mainproject
-a---- 23/02/2021 9:54 AM 6148 .DS_Store
-a---- 21/02/2021 8:58 PM 66 .gitattributes
-a---- 11/03/2021 2:35 PM 2014 index.html
-a---- 11/03/2021 2:35 PM 1603 package.json

My public folder, which contains index.html, is located in /mainproject. As you can see, I’ve also tried copying the index.html file to the root directory, but it still doesn’t work.

I’d really appreciate anyone’s help/input on this. Thank you.