docs: added troubleshooting component (#4255)

This commit is contained in:
Shahed Nasser
2023-06-06 15:18:23 +03:00
committed by GitHub
parent 926e284bac
commit b1c63c5476
64 changed files with 607 additions and 257 deletions

View File

@@ -3,6 +3,9 @@ description: 'Learn how to create a service in Medusa. This guide also includes
addHowToData: true
---
import Troubleshooting from '@site/src/components/Troubleshooting'
import ServiceLifetimeSection from '../../troubleshooting/awilix-resolution-error/_service-lifetime.md'
# How to Create a Service
In this document, youll learn how you can create a [Service](./overview.mdx) and use it across your Medusa backend just like any of the core services.
@@ -143,6 +146,19 @@ class MySubscriber {
---
## Troubleshooting
<Troubleshooting
sections={[
{
title: 'AwilixResolutionError: Could Not Resolve X',
content: <ServiceLifetimeSection />
}
]}
/>
---
## See Also
- [Create a Plugin](../plugins/create.md)

View File

@@ -3,6 +3,9 @@ description: 'Learn how to create a service in Medusa. This guide also includes
addHowToData: true
---
import Troubleshooting from '@site/src/components/Troubleshooting'
import ServiceLifetimeSection from '../../troubleshooting/awilix-resolution-error/_service-lifetime.md'
# How to Extend a Service
In this document, youll learn how to extend a core service in Medusa.
@@ -65,7 +68,7 @@ class ProductService extends MedusaProductService {
export default ProductService
```
You can learn more details about the service lifetime and other considerations when creating a service in the [Create Service documentation](./create-service.md).
You can learn more details about the service lifetime and other considerations when creating a service in the [Create Service documentation](./create-service.mdx).
---
@@ -84,3 +87,16 @@ npx @medusajs/medusa-cli develop
```
You should see the customizations you made in effect.
---
## Troubleshooting
<Troubleshooting
sections={[
{
title: 'AwilixResolutionError: Could Not Resolve X (Service Lifetime)',
content: <ServiceLifetimeSection />
}
]}
/>