Skip to content

Fix: approve dependency build scripts so the project runs out of the box - #1

Closed
bitoiu wants to merge 1 commit into
mainfrom
fix/pnpm-approve-builds-out-of-box
Closed

Fix: approve dependency build scripts so the project runs out of the box#1
bitoiu wants to merge 1 commit into
mainfrom
fix/pnpm-approve-builds-out-of-box

Conversation

@bitoiu

@bitoiu bitoiu commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Problem

A fresh clone fails at, pnpm run dev, on any recent pnpm. Not super experienced with pnpm compared to npm so did some analysis on it.

Since pnpm 10.16, pnpm install exits non-zero (ERR_PNPM_IGNORED_BUILDS) when a dependency has an unapproved build script. This template has three:

In our example that's:

  • @livekit/local-inference
  • protobufjs
  • sharp

So on pnpm 10.16+ / 11, that deps check exits 1 and pnpm run dev aborts before the agent ever starts.

Suggested Fix (AI Assisted)

Add a tracked pnpm-workspace.yaml that approves the three build scripts:

allowBuilds:
  '@livekit/local-inference': true
  protobufjs: true
  sharp: true

These values don't all need to be true from my understanding but they need to be declared true or false.

Feel free to close if there's a better solution.

`pnpm run dev` runs `node src/main.ts dev`, and the @livekit/agents CLI
performs a dependency-status check that shells out to `pnpm install`.

Since pnpm 10.16, `pnpm install` exits non-zero (ERR_PNPM_IGNORED_BUILDS)
when a dependency has an unapproved build script. This template has three
(`@livekit/local-inference`, `protobufjs`, `sharp`), so on any recent pnpm
a fresh clone fails at `pnpm run dev` before the agent starts.

CI pins pnpm 10.15.0, which predates this behavior, so the failure is not
caught there but affects every user on pnpm 10.16+ / 11.

Approve the three build scripts in a tracked pnpm-workspace.yaml (the
`pnpm` field in package.json is no longer read by pnpm 11), so the project
installs and runs out of the box.
@bitoiu

bitoiu commented Jul 17, 2026

Copy link
Copy Markdown
Owner Author

Superseded by livekit-examples#58 (targeting the upstream repo).

@bitoiu bitoiu closed this Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant