Repository: ui
Issue: [bug]: CLI breaks with pnpm catalog in pnpm workspaces
Labels: bug

### Describe the bug

#### Description
When using the `shadcn/ui` CLI in a project configured with `pnpm` and leveraging a `pnpm` catalog as part of a `pnpm workspace`, the CLI encounters an error and fails to execute commands properly. This issue seems to occur specifically when resolving dependencies or generating components within the workspace environment.

#### Expected Behavior
The `shadcn/ui` CLI should work seamlessly in `pnpm` workspaces with catalog structures, just as it does in standalone or other monorepo setups.

#### Actual Behavior
The CLI fails, showing errors related to dependency resolution or workspace paths, indicating that it does not properly account for the `pnpm` catalog.

#### Possible Solution
Ensure the CLI accounts for `pnpm` workspace configurations and properly resolves paths and dependencies in catalog structures. This might involve:
- Normalizing workspace paths.
- Using `pnpm` APIs or conventions for dependency resolution.


##### Configuration
Here is an example of a `pnpm-workspace.yaml` file and catalog configuration:

```yaml
# pnpm-workspace.yaml
packages:
  - apps/*
  - packages/*
  - tooling/*

catalog:
  "@vitejs/plugin-react": ^4.3.3
  eslint: ^9.16.0
  lucide-react: ^0.464.0
  prettier: ^3.4.1
  tailwindcss: ^3.4.16
  typescript: ^5.6.3
  vite: ^5.4.11
  zod: ^3.23.8

catalogs:
  react18:
    "@types/react": ^18.3.12
    "@types/react-dom": ^18.3.1
    react-dom: ^18.3.1
    react: ^18.3.1
```
- The issue is specific to setups where `pnpm` catalogs are used.
- Other tools in the workspace function correctly, so the issue seems localized to `shadcn/ui` CLI.

---



### Affected component/components

CLI

### How to reproduce

#### Steps to Reproduce
1. Set up a `pnpm` workspace with a catalog structure.
2. Add `shadcn/ui` to one of the workspace projects.
3. Attempt to use the CLI to add or generate components (e.g., `pnpm exec shadcn-ui add button`).
4. Observe that the CLI fails with an error.

### Codesandbox/StackBlitz link

_No response_

### Logs

```bash
pnpm dlx shadcn@latest add && prettier src --write --list-different "sidebar"

.../Library/pnpm/store/v3/tmp/dlx-51458  | +170 +++++++++++++++++
.../Library/pnpm/store/v3/tmp/dlx-51458  | Progress: resolved 170, reused 170, downloaded 0, added 170, done
✔ Which components would you like to add? › sidebar
✔ Checking registry.
✔ Updating ../../tooling/tailwind/web.ts
✔ Updating ../../tooling/tailwind/web.styles.css
⠴ Installing dependencies.
Something went wrong. Please check the error below for more details.
If the problem persists, please open an issue on GitHub.

Command failed with exit code 1: pnpm add @radix-ui/react-slot class-variance-authority lucide-react @radix-ui/react-separator @radix-ui/react-dialog @radix-ui/react-tooltip
../..                                    |  WARN  Ignoring broken lockfile at /Users/sohamnandi/Desktop/projects/projects: Lockfile /Users/sohamnandi/Desktop/projects/projects/pnpm-lock.yaml not compatible with current pnpm
../..                                    |  WARN  Ignoring broken lockfile at /Users/sohamnandi/Desktop/projects/projects/node_modules/.pnpm: Lockfile /Users/sohamnandi/Desktop/projects/projects/node_modules/.pnpm/lock.yaml not compatible with current pnpm
 ERR_PNPM_SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER  lucide-react@catalog: isn't supported by any available resolver.

This error happened while installing a direct dependency of /Users/sohamnandi/Desktop/projects/projects/packages/ui
../..                                    | Progress: resolved 1, reused 0, downloaded 0, added 0

 ELIFECYCLE  Command failed with exit code 1.
```


### System Info

```bash
Environment

pnpm version: [^9.14.4]
Node.js version: [22.12.0]
Operating System: [macOS]
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues