pi-agent - Err @ run in Dev mode

错误信息:

> git clone https://github.com/davidondrej/pi-agent
> cd pi-agent
> pnpm install
✓ Lockfile passes supply-chain policies (verified 5m ago)
Lockfile is up to date, resolution step is skipped
Already up to date
[ERR_PNPM_IGNORED_BUILDS] Ignored build scripts: @google/genai@1.52.0, protobufjs@7.6.6

Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts.

解决方案:

The pnpm install completed successfully, but two dependencies have build scripts that were ignored for security. need to approve them:
The pnpm approve-builds command is interactive and can't run in this shell. Let me check your package.json and configure it directly:
I'll add the pnpm configuration to approve the build scripts for those two dependencies:
Now run pnpm install again to apply the approved builds:
The pnpm field in package.json is deprecated. Let me revert that and use the .npmrc file instead:
The pnpm-workspace.yaml already has the structure but with placeholder values. Let me fix it:
Now run pnpm install again:
Done. The build scripts are now approved and executed successfully.

What was fixed:

  • pnpm-workspace.yaml — Changed allowBuilds values from placeholder text to true for both @google/genai and protobufjs

Both dependencies' build scripts (protobufjs postinstall and @google/genai preinstall) ran successfully.

# pnpm-workspace.yaml
allowBuilds:
  '@google/genai': true
  protobufjs: true
posted @ 2026-09-18 00:22  lukefoto  阅读(45)  评论(0)    收藏  举报