# ERR_PNPM_IGNORED_BUILDS Ignored build scripts How to fix it.

URL: https://antideploy.com/blog/pnpm-ignored-build-scripts

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

**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.
```

## At a glance

- **What it means**: pnpm blocked an install script
- **The fix**: Add allowBuilds to pnpm-workspace.yaml
- **Not here**: package.json is no longer read for this
- **On Antideploy**: It adds the setting for the build

Published 7 October 2026. Facts checked 7 October 2026. 1 min read.

## 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.

## pnpm questions, answered.

Anything else? Write to us and a person answers.

[support@antideploy.com](mailto: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.

## More guides, and the platform.

Each platform page covers one part of Antideploy: what it does, where it stops and the questions people ask. [See the whole platform](https://antideploy.com/platform), or [all the guides](https://antideploy.com/blog).

- [npm ci can only install packages when your package.json and package-lock.json are in sync](https://antideploy.com/blog/npm-ci-can-only-install-packages-when-package-json-and-package-lock-json-are-in-sync): The lock file does not match package.json. Run npm install and commit the lock file.
- [ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION](https://antideploy.com/blog/pnpm-minimum-release-age-violation): pnpm refused packages published too recently. Wait, pin the previous version, or relax the policy.
- [How to let your agent read logs and fix a failed deploy](https://antideploy.com/blog/how-to-let-your-coding-agent-read-logs-and-fix-a-failed-deploy): The loop: read the reason, read the logs, fix the code, deploy again. And what Antideploy repairs for you.

- [Deployments](https://antideploy.com/platform/deployments)
- [Logs and monitoring](https://antideploy.com/platform/logs-and-monitoring)

Facts on this page were checked against the live platform on 7 October 2026.

## 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.

To set this up, give your coding agent this sentence:

```text
Set this project up to deploy on Antideploy. Fetch https://antideploy.com/agent.md and follow it.
```
