Build Error

I am facing his issue

ERR_PNPM_OUTDATED_LOCKFILE Cannot install with “frozen-lockfile” because pnpm-lock.yaml is not up to date with /package.json
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”
Failure reason:
specifiers in the lockfile don’t match specifiers in package.json:

  • 18 dependencies were added: eslint@^8, eslint-config-next@15.1.3, @radix-ui/react-breadcrumb@^1.0.0, @radix-ui/react-calendar@^1.0.0, @radix-ui/react-drawer@^1.1.0, @radix-ui/react-form@^0.1.0, @radix-ui/react-input-otp@^1.1.0, @radix-ui/react-pagination@^1.1.0, @radix-ui/react-resizable@^1.1.0, @radix-ui/react-sheet@^1.1.0, @radix-ui/react-sidebar@^1.1.0, @radix-ui/react-skeleton@^1.1.0, @radix-ui/react-table@^1.1.0, @radix-ui/react-textarea@^1.1.0, @types/nodemailer@^6.4.14, jspdf@latest, jspdf-autotable@latest, nodemailer@^6.9.8
  • 2 dependencies were removed: @hookform/resolvers@^3.9.1, zod@^3.24.1
    Error: Command “pnpm install” exited with 1

The error means your project’s pnpm-lock.yaml dependencies don’t match the current package.json.

There are a few ways to fix it:

Option 1: Update your lockfile locally

pnpm install

Then commit and push the updated pnpm-lock.yaml file.

Option 2: Delete and regenerate the lockfile

rm pnpm-lock.yaml
pnpm install

Then commit the new lockfile.

Option 3: If you need a quick deployment fix
You can temporarily disable the frozen lockfile by adding this to your package.json:

{
  "scripts": {
    "build": "pnpm install --no-frozen-lockfile && next build"
  }
}