#1952·shadcn-vue

[Bug]: corepack pnpm does not support version ranges in devEngines.packageManager.version

Author: Lastor-ChenCreated Aug 24, 2026Updated Aug 25, 2026
Labelsbug

Reproduction

Unable to reproduce the pnpm issue on StackBlitz.

Describe the bug

When using pnpm v11+ with the new package.json setting devEngines.packageManager.version specified as a version range, the shadcn-vue install script fails.

For example:

jsonc
// package.json
"devEngines": {
  "packageManager": {
    "name": "pnpm",
    "version": ">=11.0.0 <12.0.0", // <- a version range
    "onFail": "download"
  }
}

Then run the shadcn-vue bin script.

bash
$ pnpm dlx shadcn-vue@latest init
# or
$ pnpm dlx shadcn-vue@latest add button

The installation fails when running the dependency installation step:

bash
Installing dependencies.Invalid package manager specification in package.json (pnpm@>=11.0.0 <12.0.0); expected a semver version

corepack pnpm add clsx tailwind-merge class-variance-authority @lucide/vue failed.

The issue seems to be that Corepack expects the package manager version to be an exact semver version, while devEngines.packageManager.version allows a version range.

bash
# Version range allowed by devEngines.packageManager.version
">=11.0.0 <12.0.0"

# But Corepack expects an exact version
"11.21.0"

Since pnpm v11 no longer recommends using Corepack for installation, perhaps the shadcn-vue installation script should avoid explicitly using corepack pnpm?

System Info

bash
System:
  OS: macOS 13.5
  CPU: (8) arm64 Apple M2
  Memory: 662.13 MB / 24.00 GB
  Shell: 5.9 - /bin/zsh
Binaries:
  Node: 24.18.1 - /Users/<user>/.local/state/fnm_multishells/1123_1787534478450/bin/node
  npm: 11.16.0 - /Users/<user>/.local/state/fnm_multishells/1123_1787534478450/bin/npm
  pnpm: 11.21.0 - /Users/<user>/Library/pnpm/bin/pnpm
  bun: 1.3.14 - /opt/homebrew/bin/bun
Browsers:
  Chrome: 151.0.7922.170
  Safari: 16.6
npmPackages:
  vue: ^3.5.40 => 3.5.41

Contributes

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests