Hello everything is fine? Could anyone help me with this issue?
I have the code working normally locally, however, when I deploy it, it returns this error and does not allow me to send the application to air.
8:49:06 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)
8:49:02 AM: Netlify Build
8:49:02 AM: ────────────────────────────────────────────────────────────────
8:49:02 AM:
8:49:02 AM: ❯ Version
8:49:02 AM: @netlify/build 29.19.0
8:49:02 AM:
8:49:02 AM: ❯ Flags
8:49:02 AM: baseRelDir: true
8:49:02 AM: buildId: 64d4ce97d4bd7c5d5fb9ae42
8:49:02 AM: deployId: 64d4ce97d4bd7c5d5fb9ae44
8:49:02 AM:
8:49:02 AM: ❯ Current directory
8:49:02 AM: /opt/build/repo
8:49:02 AM:
8:49:02 AM: ❯ Config file
8:49:02 AM: /opt/build/repo/netlify.toml
8:49:02 AM:
8:49:02 AM: ❯ Context
8:49:02 AM: production
8:49:02 AM:
8:49:02 AM: Build command from Netlify app
8:49:02 AM: ────────────────────────────────────────────────────────────────
8:49:02 AM:
8:49:02 AM: $ npm run build
8:49:02 AM: > ctpacolhe-frontend@0.0.0 build
8:49:02 AM: > vite build
8:49:02 AM: vite v4.4.7 building for production…
8:49:02 AM: transforming…
8:49:04 AM: ✓ 199 modules transformed.
8:49:04 AM: ✓ built in 2.03s
8:49:04 AM: Could not resolve …/…/common/cardIncident/CardIncident from src/components/cutomized/admIncidents/AdmIncidentTable.jsx
8:49:04 AM: file: /opt/build/repo/src/components/cutomized/admIncidents/AdmIncidentTable.jsx
8:49:04 AM: error during build:
8:49:04 AM: RollupError: Could not resolve …/…/common/cardIncident/CardIncident from src/components/cutomized/admIncidents/AdmIncidentTable.jsx
8:49:04 AM: at error (file:///opt/build/repo/node_modules/rollup/dist/es/shared/node-entry.js:2245:30)
8:49:04 AM: at ModuleLoader.handleInvalidResolvedId (file:///opt/build/repo/node_modules/rollup/dist/es/shared/node-entry.js:24654:24)
8:49:04 AM: at file:///opt/build/repo/node_modules/rollup/dist/es/shared/node-entry.js:24616:26
8:49:04 AM:
8:49:04 AM: build.command failed
8:49:04 AM: ────────────────────────────────────────────────────────────────
8:49:04 AM:
8:49:04 AM: Error message
8:49:04 AM: Command failed with exit code 1: npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
8:49:04 AM:
8:49:04 AM: Error location
8:49:04 AM: In Build command from Netlify app:
8:49:04 AM: npm run build
8:49:04 AM:
8:49:04 AM: Resolved config
8:49:04 AM: build:
8:49:04 AM: command: npm run build
8:49:04 AM: commandOrigin: ui
8:49:04 AM: publish: /opt/build/repo/dist
8:49:04 AM: publishOrigin: ui
8:49:04 AM: redirects:
8:49:06 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
8:49:06 AM: Failing build: Failed to build site
8:49:06 AM: Finished processing build request in 26.067s