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:
1 parent
3c33ca922a
commit
525b34d575
6 files changed
+65
No files matched your search
@@ -14,6 +14,7 @@ import OtherErrorsSection from "./troubleshooting/create-medusa-app-errors/_othe
|
|||||||
import EagainError from "./troubleshooting/create-medusa-app-errors/_eagain-error.md"
|
import EagainError from "./troubleshooting/create-medusa-app-errors/_eagain-error.md"
|
||||||
import ConnectionErrorSection from './troubleshooting/database-errors/_connection-error.md'
|
import ConnectionErrorSection from './troubleshooting/database-errors/_connection-error.md'
|
||||||
import FreshInstallationSection from './troubleshooting/awilix-resolution-error/_fresh-installation.md'
|
import FreshInstallationSection from './troubleshooting/awilix-resolution-error/_fresh-installation.md'
|
||||||
|
import EaddrinuseSection from './troubleshooting/eaddrinuse.md'
|
||||||
|
|
||||||
# Install Medusa with create-medusa-app
|
# Install Medusa with create-medusa-app
|
||||||
|
|
||||||
@@ -149,6 +150,10 @@ Based on what you're building, you can find a development path for you in the Re
|
|||||||
|
|
||||||
<Troubleshooting
|
<Troubleshooting
|
||||||
sections={[
|
sections={[
|
||||||
|
{
|
||||||
|
title: 'Error: EADDRINUSE',
|
||||||
|
content: <EaddrinuseSection />
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "EAGAIN error",
|
title: "EAGAIN error",
|
||||||
content: <EagainError />
|
content: <EagainError />
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import Troubleshooting from '@site/src/components/Troubleshooting'
|
|||||||
import SaslSection from '../../troubleshooting/database-errors/_sasl.md'
|
import SaslSection from '../../troubleshooting/database-errors/_sasl.md'
|
||||||
import ConnectionErrorSection from '../../troubleshooting/database-errors/_connection-error.md'
|
import ConnectionErrorSection from '../../troubleshooting/database-errors/_connection-error.md'
|
||||||
import FreshInstallationSection from '../../troubleshooting/awilix-resolution-error/_fresh-installation.md'
|
import FreshInstallationSection from '../../troubleshooting/awilix-resolution-error/_fresh-installation.md'
|
||||||
|
import EaddrinuseSection from '../../troubleshooting/eaddrinuse.md'
|
||||||
|
|
||||||
# Install Medusa Backend
|
# Install Medusa Backend
|
||||||
|
|
||||||
@@ -99,6 +100,10 @@ curl localhost:9000/store/products
|
|||||||
title: 'Error: connect ECONNREFUSED ::1:5432',
|
title: 'Error: connect ECONNREFUSED ::1:5432',
|
||||||
content: <ConnectionErrorSection />
|
content: <ConnectionErrorSection />
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: 'Error: EADDRINUSE',
|
||||||
|
content: <EaddrinuseSection />
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: 'AwilixResolutionError: Could Not Resolve X',
|
title: 'AwilixResolutionError: Could Not Resolve X',
|
||||||
content: <FreshInstallationSection />
|
content: <FreshInstallationSection />
|
||||||
|
|||||||
@@ -113,6 +113,16 @@ Your Next.js Starter Template is now running at `localhost:8000`
|
|||||||
|
|
||||||
## Development Notes
|
## Development Notes
|
||||||
|
|
||||||
|
### Changing Medusa Backend URL
|
||||||
|
|
||||||
|
By default, the Medusa backend runs at `http://localhost:9000`. This value is defined in your Next.js starter template under the environment variable `NEXT_PUBLIC_MEDUSA_BACKEND_URL`.
|
||||||
|
|
||||||
|
If you need to change the URL of your Medusa backend because you changed the backend's default port or because you deployed your backend, change the value of `NEXT_PUBLIC_MEDUSA_BACKEND_URL` (typically in `.env.local`) to your backend URL. For example:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
NEXT_PUBLIC_MEDUSA_BACKEND_URL=http://localhost:9001
|
||||||
|
```
|
||||||
|
|
||||||
### Toggle Search Engine Feature
|
### Toggle Search Engine Feature
|
||||||
|
|
||||||
The Next.js Starter Template by default is compatible with MeiliSearch.
|
The Next.js Starter Template by default is compatible with MeiliSearch.
|
||||||
|
|||||||
@@ -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`.
|
||||||
@@ -361,6 +361,11 @@ module.exports = {
|
|||||||
type: "category",
|
type: "category",
|
||||||
label: "Medusa Backend Errors",
|
label: "Medusa Backend Errors",
|
||||||
items: [
|
items: [
|
||||||
|
{
|
||||||
|
type: "doc",
|
||||||
|
id: "troubleshooting/eaddrinuse",
|
||||||
|
label: "EADDRINUSE Error",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: "doc",
|
type: "doc",
|
||||||
id: "troubleshooting/database-error",
|
id: "troubleshooting/database-error",
|
||||||
@@ -403,6 +408,11 @@ module.exports = {
|
|||||||
id: "troubleshooting/signing-in-to-admin",
|
id: "troubleshooting/signing-in-to-admin",
|
||||||
label: "Signing in to the Admin Dashboard",
|
label: "Signing in to the Admin Dashboard",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: "doc",
|
||||||
|
id: "troubleshooting/custom-hooks-error",
|
||||||
|
label: "Custom Hooks Error",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user