On NextJS app, I have an deploy error

I use a github repository with my nextjs code, when I try to deploy this code, I get this error:

9:21:26 PM: build-image version: c11c0eb9939c949586b0f78302107908b668a11e (focal)

9:21:26 PM: buildbot version: 55489dea6ef0428412532c40d27c9bef94a7fd4a

9:21:26 PM: Fetching cached dependencies

9:21:26 PM: Failed to fetch cache, continuing with build

9:21:26 PM: Starting to prepare the repo for build

9:21:26 PM: No cached dependencies found. Cloning fresh repo

9:21:26 PM: git clone --filter=blob:none https://github.com/zydeico/OneClick-Landing

9:21:27 PM: Preparing Git Reference refs/heads/main

9:21:29 PM: Starting to install dependencies

9:21:29 PM: Python version set to 3.8

9:21:29 PM: Attempting Ruby version 2.7.2, read from environment

9:21:29 PM: Using Ruby version 2.7.2

9:21:30 PM: Started restoring cached go cache

9:21:30 PM: Finished restoring cached go cache

9:21:31 PM: go version go1.19.10 linux/amd64

9:21:32 PM: Using PHP version 8.0

9:21:33 PM: Downloading and installing node v18.16.1...

9:21:33 PM: Downloading https://nodejs.org/dist/v18.16.1/node-v18.16.1-linux-x64.tar.xz...

9:21:33 PM: Computing checksum with sha256sum

9:21:33 PM: Checksums matched!

9:21:37 PM: Failed during stage 'Install dependencies': dependency_installation script returned non-zero exit code: 1

9:21:35 PM: Now using node v18.16.1 (npm v9.5.1)

9:21:35 PM: Enabling Node.js Corepack

9:21:36 PM: Started restoring cached build plugins

9:21:36 PM: Finished restoring cached build plugins

9:21:36 PM: Started restoring cached corepack dependencies

9:21:36 PM: Finished restoring cached corepack dependencies

9:21:36 PM: Found pnpm version (7.13.4) that doesn't match expected ()
Usage Error: Invalid package manager specification in CLI arguments; expected a semver version, range, or tag

9:21:36 PM: $ corepack prepare [--activate] [--all] [--json] [-o,--output] ...

9:21:36 PM: No pnpm workspaces detected

9:21:36 PM: Started restoring cached node modules

9:21:36 PM: Finished restoring cached node modules

9:21:36 PM: Installing npm packages using pnpm version 7.13.4

9:21:37 PM: Lockfile is up to date, resolution step is skipped

9:21:37 PM: ERR_PNPM_OUTDATED_LOCKFILE Cannot install with frozen-lockfile because pnpm-lock.yaml is not up to date with package.json

9:21:37 PM: Note that in CI environments this setting is true by default. If you still need to run install in such cases, use pnpm install --no-frozen-lockfile

9:21:37 PM: Error during pnpm install

9:21:37 PM: Build was terminated: dependency_installation script returned non-zero exit code: 1

9:21:37 PM: Failing build: Failed to install dependencies

My website is: https://illustrious-treacle-3dbaca.netlify.app/

The error itself seems pretty clear about why it’s occurring and how you might fix it:

Netlify’s build system is a CI environment

1 Like

Awesome! Thanks for the help @nathanmartin ! :smiley:

1 Like