Skip to content

Live reload cannot be disabled in version 8 #14300

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

Closed
pe8ter opened this issue Apr 28, 2019 · 3 comments · Fixed by #14301
Closed

Live reload cannot be disabled in version 8 #14300

pe8ter opened this issue Apr 28, 2019 · 3 comments · Fixed by #14301
Assignees
Labels
Milestone

Comments

@pe8ter
Copy link

pe8ter commented Apr 28, 2019

🐞 Bug report

Command

- [ ] new
- [ ] build
- [x] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

Yes, the previous version in which this bug was not present was: 7.3.8

Description

Disabling live reload when serving an app using ng serve --liveReload=false fails to disable live reloading.

🔬 Minimal Reproduction

  1. Create a default application: ng new my-app.
  2. Serve with live reload disabled: ng serve --liveReload=false.
  3. Open the page at http://localhost:4200
  4. Edit then save any HTML/CSS/TypeScript file.

Observe the page automatically reloading.

🔥 Exception or Error

n/a

🌍 Your Environment

Angular CLI: 8.0.0-rc.1
Node: 10.15.3
OS: darwin x64
Angular: 8.0.0-rc.1
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.0-rc.1
@angular-devkit/build-angular     0.800.0-rc.1
@angular-devkit/build-optimizer   0.800.0-rc.1
@angular-devkit/build-webpack     0.800.0-rc.1
@angular-devkit/core              8.0.0-rc.1
@angular-devkit/schematics        8.0.0-rc.1
@ngtools/webpack                  8.0.0-rc.1
@schematics/angular               8.0.0-rc.1
@schematics/update                0.800.0-rc.1
rxjs                              6.4.0
typescript                        3.4.5
webpack                           4.30.0
@alan-agius4 alan-agius4 added freq1: low Only reported by a handful of users who observe it rarely severity5: regression area: @angular-devkit/build-angular labels Apr 29, 2019
@ngbot ngbot bot added this to the needsTriage milestone Apr 29, 2019
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Apr 29, 2019
@alan-agius4 alan-agius4 self-assigned this Apr 29, 2019
@alan-agius4 alan-agius4 modified the milestones: Backlog, 8.0 Apr 29, 2019
vikerman pushed a commit that referenced this issue Apr 29, 2019
By default the application will be served with inline mode enabled. This means that a script will be inserted in your bundle to take care of live reloading.

However at the moment we are already adding these scripts in `_addLiveReload` method.

With this change we always disable this behaviour and only add it when needed via the `_addLiveReload` logic.

Eventually we should try to remove the logic and rely on webpack-dev-server interals.

Fixes #14300
vikerman pushed a commit that referenced this issue Apr 29, 2019
By default the application will be served with inline mode enabled. This means that a script will be inserted in your bundle to take care of live reloading.

However at the moment we are already adding these scripts in `_addLiveReload` method.

With this change we always disable this behaviour and only add it when needed via the `_addLiveReload` logic.

Eventually we should try to remove the logic and rely on webpack-dev-server interals.

Fixes #14300
@pe8ter
Copy link
Author

pe8ter commented Apr 30, 2019

I can confirm this now works correctly in version 8.0.0-rc.2. Thanks!

@CMohamed
Copy link

CMohamed commented Sep 4, 2019

The problem was related with Inotify Watches Limit on Linux. To solve the issue, I increased the watches limit to 512K. Run these commands.

sudo sysctl fs.inotify.max_user_watches=524288
sudo sysctl -p --system

After that, I restarted my IDE, and after that, the change detection started to work.

Source : https://stackoverflow.com/questions/40366212/angular-cli-ng-serve-livereload-not-working

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants