devtools 5001 crashes when trying to run two refine projects. How to change one port to another?

devtools 5001 crashes when trying to run two refine projects. How to change one port to another?
2 Replies
kapa.ai
kapa.ai3w ago
Hi @florent. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- When running two refine projects simultaneously, you may encounter a port conflict with the devtools server, which by default runs on port 5001. To resolve this issue, you can change the port for one of the projects. Here are the steps to change the port for the devtools server: 1. Manually Start the Devtools Server on a Different Port: You can manually start the devtools server on a different port using the refine-devtools command. First, ensure you have the @refinedev/devtools-server package installed.
npm install @refinedev/devtools-server

npm install @refinedev/devtools-server

Then, start the devtools server on a different port, for example, port 5002:
refine-devtools start --port 5002

refine-devtools start --port 5002

2. Disable Automatic Devtools Server Start: When running the refine dev command, you can disable the automatic start of the devtools server by passing the --devtools=false flag. This will prevent the default devtools server from starting on port 5001.
refine dev --devtools=false

refine dev --devtools=false

3. Update Your Project to Use the New Devtools Server Port: Ensure that your project is configured to connect to the devtools server running on the new port. This might involve setting environment variables or updating configuration files, depending on your project setup. By following these steps, you can run multiple refine projects simultaneously without encountering port conflicts with the devtools server. For more detailed information, you can refer to the Refine Documentation (https://refine.dev/docs/guides-concepts/development/#usage-1). If you encounter any issues or need further assistance, you can also check the related GitHub issues for additional context and solutions: - Issue #5294 (https://github.com/refinedev/refine/issues/5294) - Issue #5215 (https://github.com/refinedev/refine/issues/5215) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai3w ago
<@1184365192482652173> kapa.ai is still learning and improving, please let us know how it did by reacting below