Skip to content

[Bug]: pnpm 10+ ignores the package.json pnpm field, so overrides and onlyBuiltDependencies do not apply #25

Closed

Description

@antianqi

package.json carries a pnpm field with overrides and onlyBuiltDependencies:

  • overrides: react 18.3.1, react-dom 18.3.1, vitest 4.1.11, vite 7.3.6, hono 4.13.5, plus a few transitive pins
  • onlyBuiltDependencies: better-sqlite3, esbuild, node-pty

pnpm 10 and later no longer read that field. On pnpm 11.22.0 the install prints:

WARN  The "pnpm" field in package.json is no longer read by pnpm. The following keys were ignored: "pnpm.onlyBuiltDependencies", "pnpm.overrides".

The CI pins pnpm 9.12.0 (pnpm/action-setup v6.1.1 with version: 9.12.0), so CI keeps the overrides and a contributor on pnpm 10+ silently does not get them.

Today the install happens to come out right, because the lockfile records the overrides and pnpm carries them over. The problem is what happens next: the next pnpm update or lockfile refresh run on a newer pnpm resolves those versions differently from CI, and the two dependency trees drift apart without anyone noticing. onlyBuiltDependencies is what lets better-sqlite3, esbuild and node-pty run their install scripts, so an ignored key there is a native-module failure waiting for a Windows contributor.

Moving both keys into pnpm-workspace.yaml — where pnpm 10+ reads them — keeps one source of truth that works for the pinned CI version and for anyone on a newer pnpm.

Activity

  1. Fectivnfy112357 commented on Nov 20, 2026

    @Fectivnfy112357
    Contributor

    Reproduced with pnpm 11.22.0: dependency settings in package.json were ignored. PR #52 moves overrides and build permissions into pnpm-workspace.yaml and updates the WebUI CI pin. Linux frozen installs were validated with pnpm 10.34.9 and 11.22.0, including SQLite, node-pty and esbuild smoke checks. The three previously unapproved scripts remain denied explicitly for pnpm 11. Closing as addressed by the submitted PR, pending merge and hosted cross-platform checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions