docs: added new troubleshooting sections (#4571)
* docs: added troubleshooting section for EADDRINUSE * added custom hooks troubleshooting * fix tab issues * fix double active items in sidebar * Update sidebars.js
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
---
|
||||
title: createCustomAdminHooks Error
|
||||
---
|
||||
|
||||
If you've installed Medusa prior to v1.12.3 with the `create-medusa-app` command, then you try to update the `@medusajs/medusa` and `@medusajs/admin` to the latest `beta` versions, you might run into the following error when running your Medusa backend:
|
||||
|
||||
```bash
|
||||
Module '"medusa-react"' has no exported member 'createCustomAdminHooks'.
|
||||
```
|
||||
|
||||
This is because a previous version of `medusa-react` allowed creating custom hooks using `createCustomAdminHooks`. This has now changed to use different utility hooks, which you can learn about [the Medusa React documentation](../medusa-react/overview.mdx#custom-hooks).
|
||||
|
||||
To resolve this issue, you have the following options:
|
||||
|
||||
1. If you haven't used `createCustomAdminHooks` in your code, then you can delete the content of the `src/admin` directory which holds the widgets that create your onboarding flow, then try running your Medusa backend.
|
||||
2. If you've used the `createCustomAdminHooks` in your code, refer to the [Medusa React](../medusa-react/overview.mdx#custom-hooks) to learn about the new utility hooks and how you can use them.
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
title: 'EADDRINUSE Error'
|
||||
---
|
||||
|
||||
When you run your backend you may run to an error similar to the following:
|
||||
|
||||
```bash
|
||||
code: 'EADDRINUSE',
|
||||
errno: -48,
|
||||
syscall: 'Listen',
|
||||
address: '::',
|
||||
port: 9000
|
||||
```
|
||||
|
||||
This means that there's another process running at port `9000`. You need to either:
|
||||
|
||||
- Change the default port used by the Medusa backend. You can do that by setting the `PORT` environment variable to a new port. When you do this, make sure to change the port used in other apps that interact with your Medusa backend, such as in your [admin](../admin/quickstart.mdx#build-command-options) or [storefront](../starters/nextjs-medusa-starter.mdx#changing-medusa-backend-url).
|
||||
- Terminate other processes running on port `9000`.
|
||||
Reference in New Issue
Block a user