docs: add a need help button (#8069)

* docs: add a need help button

* change github issue link

* responsive fixes
This commit is contained in:
Shahed Nasser
2024-07-11 10:29:13 +03:00
committed by GitHub
parent f460348280
commit a8df528c65
23 changed files with 219 additions and 107 deletions
@@ -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.