qlik-oss / nebula.js

Product and framework agnostic integration APIs for Qlik's Associative Engine
https://qlik.dev/extend/set-up-nebula-environment/
MIT License
77 stars 56 forks source link

nebula serve does not refresh visualisation/extension when changes are made to /src/index.js #1471

Open MCPetrie opened 8 months ago

MCPetrie commented 8 months ago

🐛 Bug report

nebula serve does not refresh visualisation/extension when changes are made to /src/index.js

Steps to Reproduce

  1. Write some code into nebula generated component. For example element.innerHTML = '
    Hello
    ';
  2. In the CLI, nebula build
  3. nebula serve
  4. In the browser, enter web integration ID and select SaaS tenant.
  5. Select app
  6. View extension/visualisation.
  7. Make some changes to /src/index.js such as element.innerHTML = '
    Has this changed?
    ';

Expected behavior

I would expect the visualisation to auto refresh and show 'Has this changed'.

Actual behavior

Nothing happens. I need to repeat all of the steps above to see the changes

Versions

Additional context

Am I not doing something? The docs imply this should auto reload.

Caele commented 8 months ago

Hey, thanks for the report. Looking at this its not apparent why the watch won't work, it somehow just doens't trigger. What you can do as a workaround is to run serve with --build false, then in an additional terminal run build, this will trigger the hot reload.

flash-222 commented 8 months ago

I see the same problem. We updated to version 4.11.0, as it fixed bugs that were important to us. But we are forced to roll back to version 4.5.0. This is the latest version with automatic compilation. Hope this can be fixed soon.

flash-222 commented 7 months ago

Hi @Caele, version 4.14.0 has already been released, but the problem with automatically restarting the nebula serve in Visual Studio Code has not been resolved. Is there any chance that this will be resolved? It is very difficult without this feature, especially when you have to make hundreds of changes a day. Thank you.

thomaspessato commented 5 months ago

Still happening :/

thomaspessato commented 5 months ago

@Caele nebula build --watch doesn't work as well, it just builds the extension. is there any other workaround?

p-perdigao commented 5 months ago

@thomaspessato only workaround I found was downgrading each nebula package manually to 4.5.0. Was this not fixed on the 5.0 release?

thomaspessato commented 5 months ago

@p-perdigao I managed to solve by:

installing nodemon: npm install nodemon

creating a watch script inside package.json: "watch": "nodemon --watch src --ext js,html --exec npm run build"

first terminal runs: npm run start

second terminal runs: npm run watch

works fine for me now :)

p-perdigao commented 5 months ago

@thomaspessato nice, thanks! Will surely try that on my next project :)