Hello everyone,
I’m currently facing a “build” problem when trying to deploy my website. I recently added a new page, and ever since, I’ve been encountering this issue. Prior to that, the deployment was working perfectly.
4:20:01 PM: Netlify Build
4:20:01 PM: ────────────────────────────────────────────────────────────────
4:20:01 PM:
4:20:01 PM: ❯ Version
4:20:01 PM: @netlify/build 29.24.0
4:20:01 PM:
4:20:01 PM: ❯ Flags
4:20:01 PM: baseRelDir: true
4:20:01 PM: buildId: 653fc98689250f0008520453
4:20:01 PM: deployId: 653fc98689250f0008520455
4:20:01 PM:
4:20:01 PM: ❯ Current directory
4:20:01 PM: /opt/build/repo
4:20:01 PM:
4:20:01 PM: ❯ Config file
4:20:01 PM: No config file was defined: using default values.
4:20:01 PM:
4:20:01 PM: ❯ Context
4:20:01 PM: production
4:20:01 PM:
4:20:01 PM: Build command from Netlify app
4:20:01 PM: ────────────────────────────────────────────────────────────────
4:20:01 PM:
4:20:01 PM: $ npm run build
4:20:01 PM: > client@0.0.0 build
4:20:01 PM: > vite build
4:20:01 PM: vite v4.3.9 building for production...
4:20:01 PM: transforming...
4:20:02 PM: Failed during stage "building site": Build script returned non-zero exit code: 2
4:20:02 PM: ✓ 33 modules transformed.
4:20:02 PM: ✓ built in 332ms
4:20:02 PM: Could not resolve "./pages/home/peche/peche" from "src/App.jsx"
4:20:02 PM: file: /opt/build/repo/src/App.jsx
4:20:02 PM: error during build:
4:20:02 PM: RollupError: Could not resolve "./pages/home/peche/peche" from "src/App.jsx"
4:20:02 PM: at error (file:///opt/build/repo/node_modules/rollup/dist/es/shared/node-entry.js:2124:30)
4:20:02 PM: at ModuleLoader.handleInvalidResolvedId (file:///opt/build/repo/node_modules/rollup/dist/es/shared/node-entry.js:23990:24)
4:20:02 PM: at file:///opt/build/repo/node_modules/rollup/dist/es/shared/node-entry.js:23952:26
4:20:02 PM:
4:20:02 PM: "build.command" failed
4:20:02 PM: ────────────────────────────────────────────────────────────────
4:20:02 PM:
4:20:02 PM: Error message
4:20:02 PM: Command failed with exit code 1: npm run build (https://ntl.fyi/exit-code-1)
4:20:02 PM:
4:20:02 PM: Error location
4:20:02 PM: In Build command from Netlify app:
4:20:02 PM: npm run build
4:20:02 PM:
4:20:02 PM: Resolved config
4:20:02 PM: build:
4:20:02 PM: command: npm run build
4:20:02 PM: commandOrigin: ui
4:20:02 PM: environment:
4:20:02 PM: - TOKEN_SECRET
4:20:02 PM: - VITE_BACKEND_URL
4:20:02 PM: publish: /opt/build/repo/dist
4:20:02 PM: publishOrigin: ui
4:20:02 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
4:20:02 PM: Failing build: Failed to build site
4:20:02 PM: Finished processing build request in 17.109s
Has anyone else experienced something similar, or does anyone have any suggestions on how to resolve this? Your assistance would be greatly appreciated.
Thank you in advance!