The Netlify deploy errored. The relevant error log line information is: Line 27: No npm workspaces detected Line 28: Started restoring cached node modules Line 29: Finished restoring cached node modules Line 30: Installing npm packages using npm version 10.9.2 Line 31: added 5 packages in 1s Line 32: npm packages installed Line 33: Successfully installed dependencies Line 34: Starting build script Line 35: Detected 0 framework(s) Line 36: Section completed: initializing Line 37: Failed during stage 'building site': Build script returned non-zero exit code: 2 Line 38: ​ Line 39: Netlify Build  Line 40: ──────────────────────────────────────────────────────────────── Line 41: ​ Line 42: ❯ Version Line 43: @netlify/build 33.1.3 Line 44: ​ Line 45: ❯ Flags Line 46: accountId: 682e2fa484f540dc0046496c Line 47: baseRelDir: true Line 54: ❯ Config file Line 55: No config file was defined: using default values. Line 56: ​ Line 57: ❯ Context Line 58: production Line 59: ​ Line 60: Build command from Netlify app  Line 61: ──────────────────────────────────────────────────────────────── Line 62: ​ Line 63: $ npm run build Line 64: npm error Missing script: "build" Line 65: npm error Line 66: npm error To see a list of scripts, run: Line 67: npm error npm run Line 68: npm error A complete log of this run can be found in: /opt/buildhome/.npm/_logs/2025-05-22T02_52_39_227Z-debug-0.log Line 69: ​ Line 70: "build.command" failed  Line 71: ──────────────────────────────────────────────────────────────── Line 72: ​ Line 73: Error message Line 74: Command failed with exit code 1: npm run build Line 75: ​ Line 76: Error location Line 77: In Build command from Netlify app: Line 78: npm run build Line 79: ​ Line 80: Resolved config Line 81: build: Line 82: command: npm run build Line 83: commandOrigin: ui Line 84: publish: /opt/build/repo/build Line 85: publishOrigin: ui Line 86: Build failed due to a user error: Build script returned non-zero exit code: 2 Line 87: Failing build: Failed to build site Line 88: Finished processing build request in 12.555s Netlify has analyzed the error and provided the following guidance: **Diagnosis:** The build failed with the following error: - Line 63: `npm error Missing script: "build"` - Line 73: `Command failed with exit code 1: npm run build` **Solution:** 1. Verify that the `build` script is defined in the `package.json` file in the repository. 2. If the script is missing, add the `build` script to the `scripts` section of the `package.json` file: ```json "scripts": { "build": "your-build-command-here" } ``` 3. After adding the script, ensure you commit the changes to the repository and trigger a new build.