Blogpnpm

ERR_PNPM_IGNORED_BUILDS Ignored build scripts How to fix it.

Newer pnpm blocks install scripts that nobody approved. Packages like esbuild and sharp need theirs, so they install and then fail to run.

How the Agent API works
What you see
[ERR_PNPM_IGNORED_BUILDS] Ignored build scripts: esbuild, sharp.
Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts.
  • What it meanspnpm blocked an install script
  • The fixAdd allowBuilds to pnpm-workspace.yaml
  • Not herepackage.json is no longer read for this
  • On AntideployIt adds the setting for the build

What it means

Some packages unpack a ready-made program in an install script. esbuild and sharp are two. From pnpm 11, a script like that does not run unless you approve it. Blocking it makes the package install and then fail to run. The message lists the packages that were blocked.

How to fix it

The log suggests pnpm approve-builds, but that command is interactive and cannot work on a build server. Current pnpm reads the approval from pnpm-workspace.yaml, not from package.json.

  1. Create or open pnpm-workspace.yaml at the root of your project

    If there is no such file, create one.

  2. List the packages the message named

    Use the allowBuilds setting, with each package set to true.

    pnpm-workspace.yaml
    allowBuilds:
      "esbuild": true
      "sharp": true
  3. Commit it and deploy again

    A failed deploy never counts against your plan.

What Antideploy does

Antideploy recognises this failure. It adds allowBuilds for the packages the log names, in its own copy of your source, and tells you it did. It never edits your repository, so commit the file yourself to build the same way everywhere.

01Questions

pnpm questions, answered.

Anything else? Write to us and a person answers.

support@antideploy.com
Is it safe to allow these scripts?

Allow only the packages you recognise and trust. esbuild and sharp are common examples that need their scripts.

Why is the setting in a workspace file?

pnpm 11 and later read it from pnpm-workspace.yaml. The old setting in package.json is ignored.

Does this failed deploy cost anything?

No. Failed deploys never count against your plan.

Deploy something. Start with one sentence.

Paste one sentence into your coding agent, click Approve once, and get a live link. No card, no trial clock.

Start from GitHub or a folder
Prompt copied Paste it into Claude Code, Codex or Cursor and press Enter.