`npx update-browserslist-db@latest` fails with `ERR_PNPM_PUBLIC_HOIST_PATTERN_DIFF`

Author: ilyakamensCreated Mar 22, 2024Updated Mar 22, 2024

When I run npx update-browserslist-db@latest, I encounter the following error:

image

Environment information (macOS 14.1.2 (23B2091)):

bash
$ node --version
v16.14.2

$ pnpm --version
8.10.2

$ npx --version
8.5.0

All references to browserslist in pnpm-lock.yaml:

image

Running pnpm install doesn't fix the issue, and running pnpm up caniuse-lite only updates pnpm-lock.yaml (perhaps expected) and results in a surprising number of unrelated changes that also breaks my application:

 pnpm-lock.yaml | 4531 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 4194 insertions(+), 337 deletions(-)

Is there any other information I can provide that'd be helpful? I apologize if I should have opened this issue elsewhere.

Source: browserslist/browserslist