docs: improve troubleshooting guide for pnpm (#13673)

* docs: improve troubleshooting guide for pnpm

* added pnpm link to installation guide
This commit is contained in:
Shahed Nasser authored and GitHub committed 2025-10-03 13:09:01 +03:00
1 parent d58462c9c9
commit 50c1417378
5 files changed
+46 -3

No files matched your search

@@ -4,10 +4,18 @@ If you use `pnpm` as a package manager in your Medusa application, you might fac
can't resolve @medusajs/dashboard
```
You may also receive an error related to Tanstack Query:
```bash
No QueryClient set, use QueryClientProvider to set one
```
## Why This Error Occurred
Medusa doesn't officially support `pnpm` as a package manager, which may lead to unexpected errors, including issues with package resolution.
For Tanstack Query, the error occurs because the package is required by `@medusajs/dashboard`, but `pnpm` does not automatically install it as a dependency of that package.
---
## How to Fix it
@@ -17,7 +25,13 @@ To resolve this error and other potential errors, consider switching to `yarn` a
If you still want to use `pnpm`, you must manually install the following packages in your project:
```bash
pnpm add @medusajs/dashboard @medusajs/icons @meduasjs/types @medusajs/draft-order @medusajs/ui
pnpm add @medusajs/dashboard @medusajs/icons @medusajs/types @medusajs/draft-order @medusajs/ui
```
Make sure to also update these packages whenever you update your Medusa application.
For the Tanstack Query error, you must also install it manually. It must be the same version installed in [@medusajs/dashboard](https://github.com/medusajs/medusa/blob/d58462c9c91a3e335d03f758438e109caad1f839/packages/admin/dashboard/package.json#L54):
```bash
pnpm add @tanstack/react-query@{version}
```