broad-brown
broad-brown5mo ago

refine devtools

Could not connect to the devtools server. In the console, i see: WebSocket connection to 'ws://localhost:5002/' failed:
3 Replies
kapa.ai
kapa.ai5mo ago
Hi @Syn. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the information provided, it seems like you're having trouble connecting to the devtools server in your Refine application. Here are a few steps you can take to troubleshoot this issue: 1. Ensure that the @refinedev/core is up-to-date. You can update it using the following command: yarn @refinedev/core@latest source (https://discord.com/channels/837692625737613362/1159002778845315092) 2. Check if there are issues with running the websocket server or just with connecting to it. You can do this by running the following command after you start your development server using npm run dev or similar: npx wscat --connect ws://localhost:5002 source (https://discord.com/channels/837692625737613362/1159002778845315092) 3. If you're running your dev script as PORT=3001 env-cmd -f .env.dev refine start, try appending --devtools to it and run like: PORT=3001 env-cmd -f .env.dev refine start --devtools source (https://discord.com/channels/837692625737613362/1159002778845315092) If you're still facing issues, it might be due to some bugs that were identified in the past. For instance, the refine start command is designed to run the production server for the production builds not the development server. In some cases, the refine cli fallbacks to running the development server even though you've run the refine start. Also, refine start doesn't run the devtools server alongside since its designed for production builds and devtools is not going to work with production builds for performance and bundle size concerns source (https://discord.com/channels/837692625737613362/1159002778845315092). If none of these steps work, it might be best to reach out to the Refine community or support for further assistance. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai5mo ago
<@183085423604662273> kapa.ai is still learning and improving, please let us know how it did by reacting below
deep-jade
deep-jade5mo ago
Hey @Syn, any chance of missing the @refinedev/devtools dependency in your project? Check out the console when you run the dev command to make sure devtools servers are up and running. If the issue continues, please open up a GitHub issue with some minimal repro of the issue 🙏