|
1
|
When you run your Medusa application you may run to an error similar to the following: |
|
2
|
|
|
3
|
```bash |
|
4
|
code: 'EADDRINUSE', |
|
5
|
errno: -48, |
|
6
|
syscall: 'Listen', |
|
7
|
address: '::', |
|
8
|
port: 9000 |
|
9
|
``` |
|
10
|
|
|
11
|
This means that there's another process running at port `9000`. You need to either terminate the other process or change the port used by your Medusa application. |
|
12
|
|
|
13
|
To change the default port used by the Medusa application, set the `PORT` environment variable before starting your application. For example, set it in `.env`: |
|
14
|
|
|
15
|
```shell |
|
16
|
PORT=9001 |
|
17
|
``` |
|
18
|
|
|
19
|
After changing the port, make sure to change the port used in other apps that interact with your Medusa server, such as in your [admin](!docs!/learn/configurations/medusa-config#admin) or [storefront](../../../nextjs-starter/page.mdx#change-medusa-application-url). |