Please note that this was the solution I found to run the project separately. Your work environment may require a different configuration. Feel free to include your opinion or changes as appropriate.
-
Clone the Medusa project (I used the tag
v1.20.7), go topackages/admin-ui, if you cannot find the folder, verify that you are in the indicated branch or tag. -
The content inside
admin-uiwill be our project.
If you have already installed the packages, you will need to delete the node_modules folder (rkmdir node_modules).
- We update the packages:
npx ncu -u
npm install```
4. Update yarn or install it if you don't have it:
`npm install -g yarn@latest`
5. Change package version:
`"@tanstack/react-query": "^4.22.0"`
6. Finally we create the file with the environment variables:
```//.env
MEDUSA_BACKEND_URL="http://localhost:9000"
ADMIN_PATH="http://localhost:9000"```
**To consider:**
-If you create it in your Medusa backend with the `admin-ui`, you will have conflicts over port `7001 `in your local environment, for this you can do one of the following two options:
- Disable the UI on the backend from using port `7001`
- In your admin panel project (the clone), change the default port `7001 `to something like `7002`. If you use `VSCode `you can do (`ctrl + shift + f`) and search for `7001`, so you can change the port faster in the places used