Setup dev environment for nethserver-cockpit

So what I did is, I followed these instructions.

After a few fixes, the build passes now, but when I open the page, I see this:

Looks to me like a misconfiguration of webpack, any ideas?

1 Like

I think we should ask the @dev_team?

Have you sync your local repo to the nethserver machine? because it seems that localhost:8080 is a local address not the nethserver’s machine address.

Do you have started npm locally?

Ciao Edoardo, thanks for helping!
No, I have not synced anything. I expected the ui to run in my dev environment locally and then there is maybe a config file to point it to a specific server…

Maybe in the docs this point is not very clear :thinking:, thanks for the report we can add a warning to specify that the ui must be builded and synced before starting to visualize the results.

We have to follow this workflow because Cockpit not works very well if the requests arrive from localhost or domains different from the machine.

Months ago, when we start to develop the core part this behavior was the first blocking step.

1 Like

Thank you for pointing it out, I’ve just added a note to the doc: https://nethserver.github.io/nethserver-cockpit/environment/#sync-api-and-ui

1 Like

ok so do i understand correctly, that there is no use for the npm run dev command at the moment. We rather do a production build and sync it to the server. I suggest to remove the command from the dev documentation and make very clear how the procedure is, because it’s a rather special one… :slightly_smiling_face:

2 Likes
1 Like