React template with Json won't deploy

I need advice to debug deploy Netlify App
This is a react application portfolio template that utilizes the info in a json to update the template. I’ve already tried deleting the package-lock.json, reinstalling the dependencies, and installing react-scripts.

Here’s a copy of the deployment log:

10:05:17 PM: Build ready to start
10:05:20 PM: build-image version: 53b83b6bede2920f236b25b6f5a95334320dc849
10:05:20 PM: build-image tag: v3.6.0
10:05:20 PM: buildbot version: 8ae026ef4905d9174e416775c6b64aa19950569b
10:05:20 PM: Fetching cached dependencies
10:05:20 PM: Failed to fetch cache, continuing with build
10:05:20 PM: Starting to prepare the repo for build
10:05:20 PM: No cached dependencies found. Cloning fresh repo
10:05:20 PM: git clone GitHub - halowe94/react-portfolio: A react portfolio
10:05:22 PM: Preparing Git Reference refs/heads/main
10:05:24 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘public/build’ versus ‘build/’ in the Netlify UI
10:05:24 PM: Starting build script
10:05:24 PM: Installing dependencies
10:05:24 PM: Python version set to 2.7
10:05:26 PM: v12.18.0 is already installed.
10:05:27 PM: Now using node v12.18.0 (npm v6.14.4)
10:05:27 PM: Started restoring cached build plugins
10:05:27 PM: Finished restoring cached build plugins
10:05:27 PM: Attempting ruby version 2.7.1, read from environment
10:05:29 PM: Using ruby version 2.7.1
10:05:30 PM: Using PHP version 5.6
10:05:30 PM: Started restoring cached go cache
10:05:30 PM: Finished restoring cached go cache
10:05:30 PM: go version go1.14.4 linux/amd64
10:05:30 PM: go version go1.14.4 linux/amd64
10:05:30 PM: Installing missing commands
10:05:30 PM: Verify run directory
10:05:32 PM: ​
10:05:32 PM: ────────────────────────────────────────────────────────────────
10:05:32 PM: Netlify Build
10:05:32 PM: ────────────────────────────────────────────────────────────────
10:05:32 PM: ​
10:05:32 PM: ❯ Version
10:05:32 PM: @netlify/build 8.0.0
10:05:32 PM: ​
10:05:32 PM: ❯ Flags
10:05:32 PM: deployId: 5fec189d48b77e0008adae59
10:05:32 PM: mode: buildbot
10:05:32 PM: ​
10:05:32 PM: ❯ Current directory
10:05:32 PM: /opt/build/repo/public
10:05:32 PM: ​
10:05:32 PM: ❯ Config file
10:05:32 PM: No config file was defined: using default values.
10:05:32 PM: ​
10:05:32 PM: ❯ Context
10:05:32 PM: production
10:05:32 PM: ​
10:05:32 PM: ────────────────────────────────────────────────────────────────
10:05:32 PM: 1. Build command from Netlify app
10:05:32 PM: ────────────────────────────────────────────────────────────────
10:05:32 PM: ​
10:05:32 PM: $ npm run build
10:05:32 PM: > personalportfolio@0.1.0 build /opt/build/repo
10:05:32 PM: > react-scripts build
10:05:32 PM: sh: 1: react-scripts: not found
10:05:32 PM: npm ERR! code ELIFECYCLE
10:05:32 PM: npm ERR! syscall spawn
10:05:32 PM: npm ERR! file sh
10:05:32 PM: npm ERR! errno ENOENT
10:05:32 PM: npm ERR! personalportfolio@0.1.0 build: react-scripts build
10:05:32 PM: npm ERR! spawn ENOENT
10:05:32 PM: npm ERR!
10:05:32 PM: npm ERR! Failed at the personalportfolio@0.1.0 build script.
10:05:32 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
10:05:32 PM: npm WARN Local package.json exists, but node_modules missing, did you mean to install?
10:05:32 PM: npm ERR! A complete log of this run can be found in:
10:05:32 PM: npm ERR! /opt/buildhome/.npm/_logs/2020-12-30T06_05_32_414Z-debug.log
10:05:32 PM: ​
10:05:32 PM: ────────────────────────────────────────────────────────────────
10:05:32 PM: “build.command” failed
10:05:32 PM: ────────────────────────────────────────────────────────────────
10:05:32 PM: ​
10:05:32 PM: Error message
10:05:32 PM: Command failed with exit code 1: npm run build
10:05:32 PM: ​
10:05:32 PM: Error location
10:05:32 PM: In Build command from Netlify app:
10:05:32 PM: npm run build
10:05:32 PM: ​
10:05:32 PM: Resolved config
10:05:32 PM: build:
10:05:32 PM: base: /opt/build/repo/public
10:05:32 PM: command: npm run build
10:05:32 PM: commandOrigin: ui
10:05:32 PM: publish: /opt/build/repo/public/build
10:05:32 PM: Caching artifacts
10:05:32 PM: Started saving build plugins
10:05:32 PM: Finished saving build plugins
10:05:32 PM: Started saving pip cache
10:05:32 PM: Finished saving pip cache
10:05:32 PM: Started saving emacs cask dependencies
10:05:32 PM: Finished saving emacs cask dependencies
10:05:32 PM: Started saving maven dependencies
10:05:33 PM: Finished saving maven dependencies
10:05:33 PM: Started saving boot dependencies
10:05:33 PM: Finished saving boot dependencies
10:05:33 PM: Started saving rust rustup cache
10:05:33 PM: Finished saving rust rustup cache
10:05:33 PM: Started saving rust cargo bin cache
10:05:33 PM: Finished saving rust cargo bin cache
10:05:33 PM: Started saving go dependencies
10:05:33 PM: Finished saving go dependencies
10:05:35 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
10:05:35 PM: Failing build: Failed to build site
10:05:35 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2
10:05:35 PM: Finished processing build request in 15.747553876s

That is where your issue is.
Whats your package.json look like?

Hi @halowe94,

I took a look at your github repository and it looks like your portfolio is located in the root of your repo. You’ll want to make sure your base directory is blank here: Netlify App. Once you do that, things should work like normal.