4:33:41 PM: build-image version: fcb0c1b3ada6d25c1cb58e8bc514f5f23cc14f15 (focal)
4:33:41 PM: buildbot version: a1efe55811e06b820bc74e0d2ed0cf053cd737a1
4:33:41 PM: Building without cache
4:33:41 PM: Starting to prepare the repo for build
4:33:41 PM: No cached dependencies found. Cloning fresh repo
4:33:41 PM: git clone --filter=blob:none GitHub - purvesh16/discord-clone
4:33:41 PM: Preparing Git Reference refs/heads/main
4:33:42 PM: Starting to install dependencies
4:33:43 PM: Python version set to 3.8
4:33:43 PM: Attempting Ruby version 2.7.2, read from environment
4:33:43 PM: Using Ruby version 2.7.2
4:33:44 PM: Started restoring cached go cache
4:33:44 PM: Finished restoring cached go cache
4:33:45 PM: go version go1.19.13 linux/amd64
4:33:45 PM: Using PHP version 8.0
4:33:47 PM: Downloading and installing node v18.19.1…
4:33:47 PM: Downloading https://nodejs.org/dist/v18.19.1/node-v18.19.1-linux-x64.tar.xz…
4:33:47 PM: Computing checksum with sha256sum
4:33:47 PM: Checksums matched!
4:33:49 PM: Now using node v18.19.1 (npm v10.2.4)
4:33:49 PM: Enabling Node.js Corepack
4:33:49 PM: Started restoring cached build plugins
4:33:49 PM: Finished restoring cached build plugins
4:33:49 PM: Started restoring cached corepack dependencies
4:33:49 PM: Finished restoring cached corepack dependencies
4:33:49 PM: No npm workspaces detected
4:33:49 PM: Started restoring cached node modules
4:33:49 PM: Finished restoring cached node modules
4:33:49 PM: Installing npm packages using npm version 10.2.4
4:34:09 PM: added 566 packages, and audited 567 packages in 20s
4:34:09 PM: 138 packages are looking for funding
4:34:09 PM: run npm fund
for details
4:34:09 PM: 1 moderate severity vulnerability
4:34:09 PM: To address all issues, run:
4:34:09 PM: npm audit fix --force
4:34:09 PM: Run npm audit
for details.
4:34:09 PM: npm packages installed
4:34:10 PM: Successfully installed dependencies
4:34:10 PM: Starting build script
4:34:11 PM: Detected 1 framework(s)
4:34:11 PM: “next” at version “14.1.0”
4:34:11 PM: Section completed: initializing
4:34:12 PM:
4:34:12 PM: Netlify Build
4:34:12 PM: ────────────────────────────────────────────────────────────────
4:34:12 PM:
4:34:12 PM: ❯ Version
4:34:12 PM: @netlify/build 29.36.0
4:34:12 PM:
4:34:12 PM: ❯ Flags
4:34:12 PM: baseRelDir: true
4:34:12 PM: buildId: 65d5d882a53d288f7278c0d2
4:34:12 PM: deployId: 65d5d882a53d288f7278c0d4
4:34:12 PM:
4:34:12 PM: ❯ Current directory
4:34:12 PM: /opt/build/repo
4:34:12 PM:
4:34:12 PM: ❯ Config file
4:34:12 PM: No config file was defined: using default values.
4:34:12 PM:
4:34:12 PM: ❯ Context
4:34:12 PM: production
4:34:12 PM:
4:34:12 PM: ❯ Installing plugins
4:34:12 PM: - @netlify/plugin-nextjs@4.41.3
4:34:20 PM:
4:34:20 PM: ❯ Using Next.js Runtime - v4.41.3
4:34:21 PM:
4:34:21 PM: @netlify/plugin-nextjs (onPreBuild event)
4:34:21 PM: ────────────────────────────────────────────────────────────────
4:34:21 PM:
4:34:21 PM: No Next.js cache to restore.
4:34:22 PM:
4:34:22 PM: (@netlify/plugin-nextjs onPreBuild completed in 59ms)
4:34:22 PM:
4:34:22 PM: Build command from Netlify app
4:34:22 PM: ────────────────────────────────────────────────────────────────
4:34:22 PM:
4:34:22 PM: $ npm run build
4:34:22 PM: > discord-clone@0.1.0 build
4:34:22 PM: > npm run build --prefix /client
4:34:22 PM: npm ERR! code ENOENT
4:34:22 PM: npm ERR! syscall open
4:34:22 PM: npm ERR! path /client/package.json
4:34:22 PM: npm ERR! errno -2
4:34:22 PM: npm ERR! enoent Could not read package.json: Error: ENOENT: no such file or directory, open “/client/package.json”
4:34:22 PM: npm ERR! enoent This is related to npm not being able to find a file.
4:34:22 PM: npm ERR! enoent
4:34:22 PM: npm ERR! A complete log of this run can be found in: /opt/buildhome/.npm/_logs/2024-02-21T11_04_22_450Z-debug-0.log
4:34:22 PM:
4:34:22 PM: “build.command” failed
4:34:22 PM: ────────────────────────────────────────────────────────────────
4:34:22 PM:
4:34:22 PM: Error message
4:34:22 PM: Command failed with exit code 254: npm run build (Search results for '"non-zero exit code: 254"' - Netlify Support Forums)
4:34:22 PM:
4:34:22 PM: Error location
4:34:22 PM: In Build command from Netlify app:
4:34:22 PM: npm run build
4:34:22 PM:
4:34:22 PM: Resolved config
4:34:22 PM: build:
4:34:22 PM: command: npm run build
4:34:22 PM: commandOrigin: ui
4:34:22 PM: environment:
4:34:22 PM: - CI
4:34:22 PM: - CLERK_SECRET_KEY
4:34:22 PM: - DATABASE_URL
4:34:22 PM: - LIVEKIT_API_KEY
4:34:22 PM: - LIVEKIT_API_SECRET
4:34:22 PM: - NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL
4:34:22 PM: - NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL
4:34:22 PM: - NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
4:34:22 PM: - NEXT_PUBLIC_CLERK_SIGN_IN_URL
4:34:22 PM: - NEXT_PUBLIC_CLERK_SIGN_UP_URL
4:34:22 PM: - NEXT_PUBLIC_LIVEKIT_URL
4:34:22 PM: - UPLOADTHING_APP_ID
4:34:22 PM: - UPLOADTHING_SECRET
4:34:22 PM: - NEXT_PRIVATE_TARGET
4:34:22 PM: publish: /opt/build/repo/.next/out
4:34:22 PM: publishOrigin: ui
4:34:22 PM: plugins:
4:34:22 PM: - inputs: {}
4:34:22 PM: origin: ui
4:34:22 PM: package: “@netlify/plugin-nextjs”
4:34:22 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
4:34:23 PM: Failing build: Failed to build site
4:34:23 PM: Finished processing build request in 42.147s
4:34:23 PM: Failed during stage “building site”: Build script returned non-zero exit code: 2
The error seems fairly clear. There’s no package.json in the mentioned directory.