Hello please I am trying to deploy my react site but facing a lot of errors which I tried fixing but still it’s not working here is the name of the site “gorgeous-croissant-7a70bd”
and the build error logs
2:50:32 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
2:50:28 AM: Netlify Build
2:50:28 AM: ────────────────────────────────────────────────────────────────
2:50:28 AM:
2:50:28 AM: ❯ Version
2:50:28 AM: @netlify/build 29.17.2
2:50:28 AM:
2:50:28 AM: ❯ Flags
2:50:28 AM: baseRelDir: true
2:50:28 AM: buildId: 64c8646b20776d0008791dc2
2:50:28 AM: deployId: 64c8646b20776d0008791dc4
2:50:28 AM:
2:50:28 AM: ❯ Current directory
2:50:28 AM: /opt/build/repo
2:50:28 AM:
2:50:28 AM: ❯ Config file
2:50:28 AM: No config file was defined: using default values.
2:50:28 AM:
2:50:28 AM: ❯ Context
2:50:28 AM: deploy-preview
2:50:28 AM:
2:50:28 AM: Build command from Netlify app
2:50:28 AM: ────────────────────────────────────────────────────────────────
2:50:28 AM:
2:50:28 AM: $ npm run build
2:50:29 AM: > charity-site@0.1.0 build
2:50:29 AM: > react-scripts build
2:50:30 AM: Creating an optimized production build…
2:50:31 AM: Failed to compile.
2:50:31 AM:
2:50:31 AM: Module not found: Error: Can’t resolve ‘./navBar’ in ‘/opt/build/repo/src/components’
2:50:31 AM:
2:50:31 AM: build.command failed
2:50:31 AM: ────────────────────────────────────────────────────────────────
2:50:31 AM:
2:50:31 AM: Error message
2:50:31 AM: Command failed with exit code 1: npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
2:50:31 AM:
2:50:31 AM: Error location
2:50:31 AM: In Build command from Netlify app:
2:50:31 AM: npm run build
2:50:31 AM:
2:50:31 AM: Resolved config
2:50:31 AM: build:
2:50:31 AM: command: npm run build
2:50:31 AM: commandOrigin: ui
2:50:31 AM: environment:
2:50:31 AM: - REVIEW_ID
2:50:31 AM: publish: /opt/build/repo/build
2:50:31 AM: publishOrigin: ui
2:50:32 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
2:50:32 AM: Failing build: Failed to build site
2:50:33 AM: Finished processing build request in 24.52s
and a screenshot of my deploy settings
type or paste code here