title: Build script returned non-zero exit code: 2 - React
body: <p>Yes, I've searched for the solution but I can't find how to deploy my site from Netlify using react app. My app is split from the repo into client and server. I need to run the client folder. I've also tried CI= npm run build, changing the environment variable to false, what else can I do? Here's the log. I've ran the build locally also.</p>
  <p>Github repo - <a href="https://github.com/jerednav/mindful-list" rel="nofollow noreferrer">https://github.com/jerednav/mindful-list</a></p>
  <pre><code>10:41:33 PM: npm ERR! Missing script: &quot;build&quot;
  10:41:33 PM: npm ERR!
  10:41:33 PM: npm ERR! To see a list of scripts, run:
  10:41:33 PM: npm ERR!   npm run
  10:41:33 PM: npm ERR! A complete log of this run can be found in:
  10:41:33 PM: npm ERR!     /opt/buildhome/.npm/_logs/2021-11-20T06_41_33_126Z-debug.log
  10:41:33 PM: ​
  10:41:33 PM: ────────────────────────────────────────────────────────────────
  10:41:33 PM:   &quot;build.command&quot; failed                                        
  10:41:33 PM: ────────────────────────────────────────────────────────────────
  10:41:33 PM: ​
  10:41:33 PM:   Error message
  10:41:33 PM:   Command failed with exit code 1: npm run build
  10:41:33 PM: ​
  10:41:33 PM:   Error location
  10:41:33 PM:   In Build command from Netlify app:
  10:41:33 PM:   npm run build
  10:41:33 PM: ​
  10:41:33 PM:   Resolved config
  10:41:33 PM:   build:
  10:41:33 PM:     command: npm run build
  10:41:33 PM:     commandOrigin: ui
  10:41:33 PM:     environment:
  10:41:33 PM:       - CI
  10:41:33 PM:     publish: /opt/build/repo/build
  10:41:33 PM:     publishOrigin: ui
  10:41:33 PM: Caching artifacts
  10:41:33 PM: Started saving node modules
  10:41:33 PM: Finished saving node modules
  10:41:33 PM: Started saving build plugins
  10:41:33 PM: Finished saving build plugins
  10:41:33 PM: Started saving pip cache
  10:41:33 PM: Finished saving pip cache
  10:41:33 PM: Started saving emacs cask dependencies
  10:41:33 PM: Finished saving emacs cask dependencies
  10:41:33 PM: Started saving maven dependencies
  10:41:33 PM: Finished saving maven dependencies
  10:41:33 PM: Started saving boot dependencies
  10:41:33 PM: Finished saving boot dependencies
  10:41:33 PM: Started saving rust rustup cache
  10:41:33 PM: Finished saving rust rustup cache
  10:41:33 PM: Started saving go dependencies
  10:41:33 PM: Finished saving go dependencies
  10:41:36 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
  10:41:36 PM: Creating deploy upload records
  10:41:36 PM: Failing build: Failed to build site
  10:41:36 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
  10:41:36 PM: Finished processing build request in 14.470081767s
  </code></pre>