Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yarn linking KDS to Kolibri development server doesn't work when done after running the server at least once #10809

Closed
MisRob opened this issue Jun 8, 2023 · 6 comments
Labels
TAG: dev experience Build performance, linting, debugging...

Comments

@MisRob
Copy link
Member

MisRob commented Jun 8, 2023

Observed behavior

When Kolibri is run with devserver or devserver-hot and KDS is linked to Kolibri via yarn link after the server was run at least once, updates done to KDS local repository don't propagate to the app, making the development process cumbersome and inefficient.

This should be resolved by #10847

Expected behavior

devserver/devserver-hot works well with yarn link

User-facing consequences

None

Steps to reproduce

  1. Set up a fresh Kolibri repository and development environment by following Getting started (may be unnecessary for reproducing, however I wanted to eliminate as many influences as possible)
  2. Run the development server with yarn run devserver/yarn run devserver-hot
  3. Stop the development server
  4. Link KDS to Kolibri as described in KDS docs
  5. Make some changes to KDS repository that should reflect in Kolibri's UI in an obvious way (e.g. delete a significant part of a KDS component)
  6. Run yarn run devserver/yarn run devserver-hot
  7. Open Kolibri in a private browser window
  8. See UI not being updated as expected

Comments

  • When linking is done before running the development server for the first time, that is when skipping steps to reproduce 2 and 3, updates propagate as expected (I think it still wouldn't work for further updates done later on, however I didn't check it)
  • When Kolibri run with yarn run build and yarn run python-devserver, updates propagate as expected
  • Interestingly, even though when KDS updates are not reflected in UI, the Kolibri server seems to register them properly as can be seen in the terminal screenshot made right after I made an update to a KDS component
    Screenshot from 2023-06-08 14-38-50
  • When I investigated this problem, I noticed The development server doesn't reflect node_modules updates done after running the server at least once #10808 which may be its main cause

Context

  • Kolibri 0.16.0a14.dev0+git.124.g726134e8
  • Google Chrome Version 113.0.5672.92 (Official Build) (64-bit)
  • Ubuntu 20.04.6 LTS
@im-NL
Copy link
Contributor

im-NL commented Jun 12, 2023

Would like to point out that yarn run devserver-hot was not working for me initially either so instead I used kolibri start in the way mentioned in the setup docs as a workaround. Seemed to work, but ofcourse then I had to rebuild every time I made a change. This was inefficient but after some time when I ran yarn run devserver-hotagain it randomly started to work.

edit:
I'm on macOS Monterey 12.6.5
kolibri, version 0.16.0a14.dev0+git.187.g91389197

@MisRob
Copy link
Member Author

MisRob commented Jun 13, 2023

Hi @im-NL, if this is still an issue, could you share what error messages you saw when setting up your development environment or running the development server in more detail? Also, seeing your terminal output would be helpful. There's a section dedicated to the development environment on our forum for developers so if you could post there, that'd be best.

@im-NL
Copy link
Contributor

im-NL commented Jun 13, 2023

It was working for me before but doesn't seem to work anymore
https://pastebin.com/zN0a8YUn <- Here's the entire terminal output

This is my folder structure just in case it's useful

open-source
|_> kolibri // the repository
|_> kolibrienv // the python environment

It was working for me before so I am going to be setting up the entire kolibri environment from scratch now.

@MisRob
Copy link
Member Author

MisRob commented Jun 14, 2023

This could be closed by #10847

@MisRob
Copy link
Member Author

MisRob commented Jun 16, 2023

@im-NL Looking at your terminal output, I can't think of anything else than trying to set up the Node environment again including reinstalling node packages.

It was working for me before so I am going to be setting up the entire Kolibri environment from scratch now.

That may be best. Let us know if you still experience some issues (in that case having a terminal output for all your environment setup steps would be very helpful)

@MisRob
Copy link
Member Author

MisRob commented Dec 15, 2023

I will close this because now there is a better way to develop Kolibri with local KDS #10847

@MisRob MisRob closed this as completed Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TAG: dev experience Build performance, linting, debugging...
Projects
None yet
Development

No branches or pull requests

2 participants