PKG0006Declare singleton packages by range
Why it happens
An app shares a singleton only when every declaration accepts the app's version. An exact peer fails strict peer checks or makes the package manager install a second copy next to the app's, and an exact dependency installs its own copy whenever the app has another version. Two copies of Vue, Nuxt or React split their state, so injections and composables find nothing, and two copies of h3 or Drizzle fail their identity checks.
Fix
Declare the peer as a range that accepts the app's version, such as "^3.5.44", or point catalog: at a catalog entry that is a range. For a dependency, take the singleton from the app as a peer, or depend on a range. Configure more singletons with "warn", { "singletons": "comark", "@ai-sdk/*" }.
Example
Accept the app's Vue
Before
{ "peerDependencies": { "vue": "3.5.44" } }
After
{ "peerDependencies": { "vue": "^3.5.44" } }
Verify the fix
Run only this rule after editing so the report stays focused on the diagnostic you are closing:
pnpm vite-doctor . --extends package/recommended --rules package/no-pinned-singleton