Hello everyone,
To view the Meshery UI, we can rather run make server (inside the meshery repo) and it will start the UI on port 9081.
We can after run make ui to start the Next.js app (this will start the Meshery UI on port 3000 and we can use the hot reload next.js feature of easy development)
I was trying to solve the issue inside the console when running make ui (the next js Meshery UI).
Most of the error message was of this nature:
[browser] called `injectEndpoints` to override already-existing endpointName deleteEvent without specifying `overrideExisting: true`
at (rtk-query/notificationCenter.ts:85:19)
at (components/layout/NotificationCenter/filter.tsx:1:1)
at (components/layout/NotificationCenter/index.tsx:16:1)
at (components/layout/Header/Header.tsx:3:1)
at (pages/_app.tsx:18:1)
83 | addTagTypes: Object.values(PROVIDER_TAGS),
84 | })
85 | .injectEndpoints({
| ^
86 | endpoints: (builder) => ({
87 | getEvents: builder.query({
88 | query: ({ page = 0, filters = {} }) => { (rtk-query/notificationCenter.ts:85:19)
After a little bit of research I found that adding an overrideExisting set to true on the rtk instance object (this property were present on some rtk file) will solve the issue. And I did so, and the error desappaered and I could use the Meshery client locally on port 3000 successfully.
Just one problem, 2 test are now failling yet the UI is now working locally.
Can this approach be a step forward to silence the issue in the console when running make ui?
If yes, then I can look forward on why the 2 tests are failling.
One more question: how do you usually work on UI-related tasks? I assume that, for hot reload, it’s better to run the Next.js app using a command like make ui, after starting the server first with make server. With make ui-build, I think that this can be time consuming for every single change inside the UI.
The console errors mentioned above were blocking me from moving forward with some UI improvements I would like to work on. Or, when working on the UI, should I restart the server each time and then check the changes from the server running on port 9081?