docs: add a need help button (#8069)
* docs: add a need help button * change github issue link * responsive fixes
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
import AclErrorSection from "../_sections/other/s3-acl.mdx"
|
||||
|
||||
export const metadata = {
|
||||
title: `S3 Plugin ACL Error`,
|
||||
}
|
||||
|
||||
# {metadata.title}
|
||||
|
||||
<AclErrorSection />
|
||||
@@ -1,12 +1,12 @@
|
||||
If you're running the Medusa backend through tools like VSCode or GitHub Codespaces, you must ensure that:
|
||||
If you're running the Medusa application through tools like VSCode or GitHub Codespaces, you must ensure that:
|
||||
|
||||
1. Port forwarding is configured for ports `9000` and `7001`. Refer to the following resources on how to configure forwarded ports:
|
||||
- [VSCode local development.](https://code.visualstudio.com/docs/editor/port-forwarding)
|
||||
- [VSCode remote development.](https://code.visualstudio.com/docs/remote/ssh#_forwarding-a-port-creating-ssh-tunnel)
|
||||
- [GitHub Codespaces.](https://docs.github.com/en/codespaces/developing-in-a-codespace/forwarding-ports-in-your-codespace)
|
||||
2. If your tool or IDE exposes an address other than `localhost`, such as `127.0.0.1`, make sure to add that address to the [adminCors](/references/medusa-config#adminCors) Medusa configuration. Your tool will show you what the forwarded address is.
|
||||
2. If your tool or IDE exposes an address other than `localhost`, such as `127.0.0.1`, make sure to add that address to the `adminCors` Medusa configuration. Your tool will show you what the forwarded address is.
|
||||
|
||||
After setting these configurations, run your Medusa backend and try again. If you couldn't create an admin user before, run the following command in the root directory of your Medusa project to create an admin user:
|
||||
After setting these configurations, run your Medusa application and try again. If you couldn't create an admin user before, run the following command in the root directory of your Medusa project to create an admin user:
|
||||
|
||||
```bash
|
||||
npx medusa user -e admin@medusa-test.com -p supersecret
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
This error typically occurs when you set up a Medusa project with `create-medusa-app` and try to run the Medusa backend.
|
||||
This error typically occurs when you set up a Medusa project with `create-medusa-app` and try to run the Medusa application.
|
||||
|
||||
To resolve this issue, make sure you change into the `backend` directory of the Medusa project you created before trying to start the Medusa backend:
|
||||
To resolve this issue, make sure you change into the application's directory of the Medusa project you created before trying to start the Medusa application:
|
||||
|
||||
```bash npm2yarn
|
||||
cd backend
|
||||
npx medusa develop
|
||||
cd my-medusa-store
|
||||
npm run dev
|
||||
```
|
||||
@@ -1,10 +1,10 @@
|
||||
When you start your Medusa backend you may run into the following error:
|
||||
When you start your Medusa application you may run into the following error:
|
||||
|
||||
```bash
|
||||
Error: connect ECONNREFUSED ::1:5432
|
||||
```
|
||||
|
||||
This error occurs because the backend couldn't connect to the PostgreSQL database. The issue could be one of the following:
|
||||
This error occurs because the application couldn't connect to the PostgreSQL database. The issue could be one of the following:
|
||||
|
||||
1. PostgreSQL server isn't running. Make sure it's always running while the Medusa backend is running.
|
||||
2. The connection URL to your PostgreSQL database is incorrect. This could be because of incorrect credentials, port number, or connection URL format. The format should be `postgres://[user][:password]@[host][:port]/[dbname]`. Make sure that the connection URL format is correct, and the credentials passed in the URL are correct. You can learn more about formatting the connection URL [here](/references/medusa-config#postgresql-configurations)
|
||||
1. PostgreSQL server isn't running. Make sure it's always running while the Medusa application is running.
|
||||
2. The connection URL to your PostgreSQL database is incorrect. This could be because of incorrect credentials, port number, or connection URL format. The format should be `postgres://[user][:password]@[host][:port]/[dbname]`. Make sure that the connection URL format is correct, and the credentials passed in the URL are correct. You can learn more about formatting the connection URL [here](/references/medusa-config#databaseUrl)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
When connecting your Medusa backend to a PostgreSQL Docker container, make sure the `5432` port is exposed.
|
||||
When connecting your Medusa application to a PostgreSQL Docker container, make sure the `5432` port is exposed.
|
||||
|
||||
To do that, either pass the `-p` option to the `docker run` command. For example:
|
||||
|
||||
@@ -22,4 +22,4 @@ npx create-medusa-app@latest --db-url "postgres://user:password@localhost:<YOUR_
|
||||
|
||||
Where `<YOUR_PORT>` is the exposed port if it's different than `5432`.
|
||||
|
||||
Refer to the [databaseUrl configuration documentation](/references/medusa-config#databaseUrl) to learn how to set the database URL for an installed Medusa backend.
|
||||
Refer to the [databaseUrl configuration documentation](/references/medusa-config#databaseUrl) to learn how to set the database URL for an installed Medusa application.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
If you are experiencing connection issues when trying to access your Medusa backend from a storefront or the admin dashboard, it is most likely due to Cross-Origin Resource Sharing (CORS) issues.
|
||||
If you are experiencing connection issues when trying to access your Medusa application from a storefront or the admin dashboard, it is most likely due to Cross-Origin Resource Sharing (CORS) issues.
|
||||
|
||||
You might see a log in your browser console, that looks like this:
|
||||
|
||||
@@ -12,8 +12,11 @@ module.exports = defineConfig({
|
||||
http: {
|
||||
storeCors: process.env.STORE_CORS,
|
||||
adminCors: process.env.ADMIN_CORS,
|
||||
authCors: process.env.AUTH_CORS,
|
||||
},
|
||||
// ...
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
Learn more about these configurations in [this documentation](/references/medusa-config#http)
|
||||
@@ -1,4 +1,4 @@
|
||||
When you run your backend you may run to an error similar to the following:
|
||||
When you run your Medusa application you may run to an error similar to the following:
|
||||
|
||||
```bash
|
||||
code: 'EADDRINUSE',
|
||||
@@ -10,5 +10,5 @@ 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/configuration.mdx#build-command-options) or [storefront](../starters/nextjs-medusa-starter.mdx#changing-medusa-backend-url).
|
||||
- Change the default port used by the Medusa application. 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 application, such as in your [admin](/references/medusa-config#admin) or [storefront](../../../nextjs-starter/page.mdx#change-medusa-application-url).
|
||||
- Terminate other processes running on port `9000`.
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
If you're using the S3 Plugin and, when you upload an image, you receive the following error on your Medusa backend:
|
||||
|
||||
```bash noReport
|
||||
AccessControlListNotSupported: The bucket does not allow ACLs
|
||||
```
|
||||
|
||||
Try the following:
|
||||
|
||||
1. Go to your S3 Bucket, then choose the Permissions tab.
|
||||
2. Scroll to Object Ownership and click the Edit button.
|
||||
3. Select ACLs enabled and choose for Object Ownership the radio button Bucket owner preferred.
|
||||
4. Click the Save Changes.
|
||||
|
||||
Try uploading again after making this change. Upload should be successful.
|
||||
@@ -1,22 +0,0 @@
|
||||
export const metadata = {
|
||||
title: `Database Transaction Not Rolling Back When Promise.all is Used`,
|
||||
}
|
||||
|
||||
# {metadata.title}
|
||||
|
||||
Due to how `Promise.all` works, when you run multiple database transactions within it, these transactions may not be rolled back when an error occurs.
|
||||
|
||||
To mitigate this issue, use the `promiseAll` function which can be imported from `@medusajs/utils`. For example:
|
||||
|
||||
```ts
|
||||
import { promiseAll } from "@medusajs/utils"
|
||||
import { TransactionBaseService } from "@medusajs/medusa"
|
||||
|
||||
class MyService extends TransactionBaseService {
|
||||
async performTransactions() {
|
||||
return await promiseAll([
|
||||
// your transactions....
|
||||
])
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -1,12 +1,13 @@
|
||||
import TypeError from "../_sections/create-medusa-app-errors/typeerror.mdx"
|
||||
import OtherErrors from "../_sections/create-medusa-app-errors/other-errors.mdx"
|
||||
import NextjsError from "../_sections/nextjs/cma-option.mdx"
|
||||
import InvalidTokenError from "../_sections/create-medusa-app-errors/no-browser-token-error.mdx"
|
||||
import DockerSection from "../_sections/database-errors/docker.mdx"
|
||||
import DbUrlError from "../_sections/create-medusa-app-errors/db-url-error.mdx"
|
||||
import ForwardingError from "../_sections/create-medusa-app-errors/forwarding.mdx"
|
||||
|
||||
export const metadata = {
|
||||
title: `Common Create-React-App Errors`,
|
||||
title: `Common create-medusa-app Errors`,
|
||||
}
|
||||
|
||||
# {metadata.title}
|
||||
@@ -41,6 +42,12 @@ export const metadata = {
|
||||
|
||||
---
|
||||
|
||||
## Can't Access Next.js Starter Storefront
|
||||
|
||||
<NextjsError />
|
||||
|
||||
---
|
||||
|
||||
## Other Errors
|
||||
|
||||
<OtherErrors />
|
||||
@@ -4,14 +4,12 @@ export const metadata = {
|
||||
|
||||
# {metadata.title}
|
||||
|
||||
{/* TODO add link [Upgrade Guides](../upgrade-guides/page.mdx) */}
|
||||
|
||||
If you run into errors after updating Medusa and its dependencies, it's highly recommended to check the Upgrade Guides if there is a specific guide for your version. These guides include steps required to perform after upgrading Medusa.
|
||||
|
||||
If there's no upgrade guide for your version, make sure that you ran the `migrations` command in the root directory of your Medusa backend:
|
||||
If there's no upgrade guide for your version, make sure that you ran the `migrations` command in the root directory of your Medusa application:
|
||||
|
||||
```bash
|
||||
npx medusa migrations run
|
||||
```
|
||||
|
||||
This ensures your backend has the latest database structure required. Then, try running your Medusa backend again and check whether the same error occurs.
|
||||
This ensures your application has the latest database structure required. Then, try running your Medusa application again and check whether the same error occurs.
|
||||
|
||||
@@ -6,10 +6,4 @@ export const metadata = {
|
||||
|
||||
# {metadata.title}
|
||||
|
||||
<Note type="soon">
|
||||
|
||||
The following troubleshooting guides were created for Medusa v1 and might not be useful for Medusa v2.
|
||||
|
||||
</Note>
|
||||
|
||||
<ChildDocs />
|
||||
Reference in New Issue
Block a user