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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MCPetrie opened this issue Feb 2, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@MCPetrie
Copy link

MCPetrie commented Feb 2, 2024

馃悰 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

  • nebula.js: (4.9.0)
  • Platform: Windows
  • Browser: Chrome

Additional context

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

@Caele Caele added the bug Something isn't working label Feb 8, 2024
@Caele
Copy link
Collaborator

Caele commented Feb 8, 2024

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
Copy link

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
Copy link

flash-222 commented Mar 20, 2024

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
Copy link

Still happening :/

@thomaspessato
Copy link

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

@p-perdigao
Copy link

@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
Copy link

@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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants