Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Hot Reload Implementaion #12

Open
anchitjindal91 opened this issue May 9, 2018 · 4 comments
Open

Hot Reload Implementaion #12

anchitjindal91 opened this issue May 9, 2018 · 4 comments

Comments

@anchitjindal91
Copy link

anchitjindal91 commented May 9, 2018

Every time I change the code, have to run 'npm run demo' command to reflect changes. So just want to know how to handle it like Hot-reload?

@beeman
Copy link
Contributor

beeman commented May 9, 2018

Hey! If you run 'npm run demo' the changes should be picked up automatically. Of that's not the case there is an issue.

Can you post the output of ng version?

@anchitjindal91
Copy link
Author

anchitjindal91 commented May 10, 2018

Hey! Below is detail
Your global Angular CLI version (6.0.0) is greater than your local
version (1.7.4). The local Angular CLI version is used.

Angular CLI: 1.7.4
Node: 10.0.0
OS: linux x64
Angular: 5.2.7
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

angular/cli: 1.7.4
angular-devkit/build-optimizer: 0.3.2
angular-devkit/core: 0.3.2
angular-devkit/schematics: 0.3.2
ngtools/json-schema: 1.2.0
ngtools/webpack: 1.10.2
schematics/angular: 0.3.2
schematics/package-update: 0.3.2
typescript: 2.6.2
webpack: 3.11.0

What i have to do for instant code reflect? Like if i change anything in html can see in web without rebuilding.

@beeman
Copy link
Contributor

beeman commented May 15, 2018

@anchitjindal91 can you verify that this works correctly on other Angular CLI projects you have?

@shilpisingh13
Copy link

Hey,

I too had the same issue and the following helped me in resolving it.

Basically listen uses inotify by default on Linux to monitor directories for changes and it's limit is set to 8192.

The following gets the present inotify limit:
$ cat /proc/sys/fs/inotify/max_user_watches

Sometimes the limit that is set is not sufficient to watch all files inside a directory and so the limit should be changed .

You can set a new limit temporary with:
$ sudo sysctl fs.inotify.max_user_watches=524288
$ sudo sysctl -p

For making the limit permanent :

$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
$ sudo sysctl -p

Hope this works for you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants