correct-apricot
correct-apricot12mo ago

Start refine dashboard nextjs application in watch mode

Hey there! Can someone guide me that how can I start my refine dashboard in watch. So whenever I make changes in code, I don't have restart my app.
3 Replies
kapa.ai
kapa.ai12mo ago
Hi @athar1711. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Sure, I can guide you on how to run your refine dashboard in watch mode. This mode allows your application to automatically re-compile whenever you make changes in the code. Firstly, you need to ensure that you have Node version 18 installed as it is required for running the project in development mode. The refine project uses multiple packages and manages them using Lerna (https://github.com/lerna/lerna). After installing the dependencies with npm install, you will need to bootstrap and start the packages you plan to work on in watch mode. These packages are located under packages/ and examples/ directories. Here are the steps to follow: 1. Bootstrap and build all packages:
npm run bootstrap:all
npm run build:all
npm run bootstrap:all
npm run build:all
2. Bootstrap the example you want to work on:
npm run bootstrap -- --scope refine-use-select-example
npm run bootstrap -- --scope refine-use-select-example
You can add the packages you want to bootstrap with the scope (https://lerna.js.org/docs/api-reference/commands#--scope-glob) filter. 3. Start the packages you want to work on in watch mode:
npm run start -- --scope @refinedev/core --scope @refinedev/antd --scope refine-use-select-example
npm run start -- --scope @refinedev/core --scope @refinedev/antd --scope refine-use-select-example
This command starts the example named refine-use-select-example in dev mode. The value of the flag --scope is the name that is defined in its package.json file. Note that --scope flag should be used for every package that should be filtered. Now all filtered packages are running in watch mode. They should re-compile when you make a change in any of them. For more details, you can refer to the refine documentation on contributing (https://refine.dev/docs/contributing). Let me know if you need further assistance! ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai12mo ago
<@1070793099179216996> kapa.ai is still learning and improving, please let us know how it did by reacting below
correct-apricot
correct-apricot12mo ago
Issue resolved. Was using wrong command to start application.