Site not building - CI=npm run build not working

The only time the site has built and deployed correctly was the very first build made when I created the account. Every other build has failed even after updating the build commands in the site settings and the toml file to use CI=npm run build.

5:06:35 PM: Waiting for other deploys from your team to complete. Check the queue: Netlify App
5:06:43 PM: Build ready to start
5:06:46 PM: build-image version: d2c6dbeac570350a387d832f64bc980dc964ad65 (focal)
5:06:46 PM: build-image tag: v4.8.0
5:06:46 PM: buildbot version: e58b6be665675c0f99b33132a8c1eec1f775eba1
5:06:46 PM: Fetching cached dependencies
5:06:47 PM: Failed to fetch cache, continuing with build
5:06:47 PM: Starting to prepare the repo for build
5:06:47 PM: No cached dependencies found. Cloning fresh repo
5:06:47 PM: git clone https://github.com/sparkcity/Portfolio
5:06:47 PM: Preparing Git Reference refs/heads/main
5:06:48 PM: Parsing package.json dependencies
5:06:49 PM: Starting build script
5:06:49 PM: Installing dependencies
5:06:49 PM: Python version set to 2.7
5:06:50 PM: v16.14.2 is already installed.
5:06:51 PM: Now using node v16.14.2 (npm v8.5.0)
5:06:51 PM: Started restoring cached build plugins
5:06:51 PM: Finished restoring cached build plugins
5:06:51 PM: Attempting ruby version 2.7.2, read from environment
5:06:53 PM: Using ruby version 2.7.2
5:06:53 PM: Using PHP version 8.0
5:06:54 PM: No npm workspaces detected
5:06:54 PM: Started restoring cached node modules
5:06:54 PM: Finished restoring cached node modules
5:06:54 PM: Installing NPM modules using NPM version 8.5.0
5:06:56 PM: npm WARN old lockfile
5:06:56 PM: npm WARN old lockfile The package-lock.json file was created with an old version of npm,
5:06:56 PM: npm WARN old lockfile so supplemental metadata must be fetched from the registry.
5:06:56 PM: npm WARN old lockfile
5:06:56 PM: npm WARN old lockfile This is a one-time fix-up, please be patient…
5:06:56 PM: npm WARN old lockfile
5:07:13 PM: added 215 packages, and audited 216 packages in 18s
5:07:13 PM: 32 packages are looking for funding
5:07:13 PM: run npm fund for details
5:07:13 PM: 1 high severity vulnerability
5:07:13 PM: To address all issues, run:
5:07:13 PM: npm audit fix
5:07:13 PM: Run npm audit for details.
5:07:13 PM: NPM modules installed
5:07:13 PM: Started restoring cached go cache
5:07:13 PM: Finished restoring cached go cache
5:07:13 PM: go version go1.16.5 linux/amd64
5:07:14 PM: go version go1.16.5 linux/amd64
5:07:14 PM: Installing missing commands
5:07:14 PM: Verify run directory
5:07:15 PM: ​
5:07:15 PM: ────────────────────────────────────────────────────────────────
5:07:15 PM: Netlify Build
5:07:15 PM: ────────────────────────────────────────────────────────────────
5:07:15 PM: ​
5:07:15 PM: ❯ Version
5:07:15 PM: @netlify/build 27.0.1
5:07:15 PM: ​
5:07:15 PM: ❯ Flags
5:07:15 PM: baseRelDir: true
5:07:15 PM: buildId: 62646a5b6625680559c0227f
5:07:15 PM: deployId: 62646a5b6625680559c02281
5:07:15 PM: ​
5:07:15 PM: ❯ Current directory
5:07:15 PM: /opt/build/repo
5:07:15 PM: ​
5:07:15 PM: ❯ Config file
5:07:15 PM: /opt/build/repo/netlify.toml
5:07:15 PM: ​
5:07:15 PM: ❯ Context
5:07:15 PM: production
5:07:16 PM: ​
5:07:16 PM: ❯ Loading plugins
5:07:16 PM: - @netlify/plugin-nextjs@4.4.2 from netlify.toml and package.json
5:07:17 PM: ​
5:07:17 PM: ────────────────────────────────────────────────────────────────
5:07:17 PM: 1. @netlify/plugin-nextjs (onPreBuild event)
5:07:17 PM: ────────────────────────────────────────────────────────────────
5:07:17 PM: ​
5:07:17 PM: No Next.js cache to restore.
5:07:17 PM: Netlify configuration property “build.environment.NEXT_PRIVATE_TARGET” value changed.
5:07:17 PM: ​
5:07:17 PM: (@netlify/plugin-nextjs onPreBuild completed in 36ms)
5:07:17 PM: ​
5:07:17 PM: ────────────────────────────────────────────────────────────────
5:07:17 PM: 2. build.command from netlify.toml
5:07:17 PM: ────────────────────────────────────────────────────────────────
5:07:17 PM: ​
5:07:17 PM: $ CI= npm run build
5:07:18 PM: > next-netlify-starter@0.5.0 build
5:07:18 PM: > next build
5:07:19 PM: warn - No build cache found. Please configure build caching for faster rebuilds. Read more: no-cache | Next.js
5:07:19 PM: info - Checking validity of types…
5:07:19 PM: warn - No ESLint configuration detected. Run next lint to begin setup
5:07:19 PM: info - Creating an optimized production build…
5:07:29 PM: info - Compiled successfully
5:07:29 PM: info - Collecting page data…
5:07:34 PM: > Build optimization failed: found pages without a React Component as default export in
5:07:34 PM: pages/resume
5:07:34 PM: pages/projects
5:07:34 PM: See page-without-valid-component | Next.js for more info.
5:07:34 PM: ​
5:07:34 PM: ────────────────────────────────────────────────────────────────
5:07:34 PM: “build.command” failed
5:07:34 PM: ────────────────────────────────────────────────────────────────
5:07:34 PM: ​
5:07:34 PM: Error message
5:07:34 PM: Command failed with exit code 1: CI= npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
5:07:34 PM: ​
5:07:34 PM: Error location
5:07:34 PM: In build.command from netlify.toml:
5:07:34 PM: CI= npm run build
5:07:34 PM: ​
5:07:34 PM: Resolved config
5:07:34 PM: build:
5:07:34 PM: command: CI= npm run build
5:07:34 PM: commandOrigin: config
5:07:34 PM: environment:
5:07:34 PM: - NEXT_PRIVATE_TARGET
5:07:34 PM: publish: /opt/build/repo/.next
5:07:34 PM: publishOrigin: config
5:07:34 PM: plugins:
5:07:34 PM: - inputs: {}
5:07:34 PM: origin: config
5:07:34 PM: package: ‘@netlify/plugin-nextjs’
5:07:35 PM: Caching artifacts
5:07:35 PM: Started saving node modules
5:07:35 PM: Finished saving node modules
5:07:35 PM: Started saving build plugins
5:07:35 PM: Finished saving build plugins
5:07:35 PM: Started saving pip cache
5:07:35 PM: Finished saving pip cache
5:07:35 PM: Started saving emacs cask dependencies
5:07:35 PM: Finished saving emacs cask dependencies
5:07:35 PM: Started saving maven dependencies
5:07:35 PM: Finished saving maven dependencies
5:07:35 PM: Started saving boot dependencies
5:07:35 PM: Finished saving boot dependencies
5:07:35 PM: Started saving rust rustup cache
5:07:35 PM: Finished saving rust rustup cache
5:07:35 PM: Started saving go dependencies
5:07:35 PM: Finished saving go dependencies
5:07:36 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
5:07:36 PM: Creating deploy upload records
5:07:36 PM: Failing build: Failed to build site
5:07:36 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
5:07:37 PM: Finished processing build request in 50.542403496s

Did you check those pages? React seems to be complaining about that.