webpack live reload is not working.
I have installed the webpack but the live reload is not working , it is building the modules and caching it.
Linux 4.4.0-31-generic node v6.2.2 npm v3.10.5
angular-cli: 1.0.0-beta.11-webpack node: 6.2.2 os: linux x64
Found the solution for Ubuntu webpack rebuild issue.
Seems it was indeed an problem with inotify max_user_watches as told by @Namek
sudo echo "fs.inotify.max_user_watches=524288" >> /etc/sysctl.conf
sudo sysctl -p /etc/sysctl.conf
Changing fs.inotify.max_user_watches to 16384 worked for me. The strange thing is that it used to work with 8k watches, anyone knows the reason for the increased number of watches in webpack ?
I use Vagrant with shared folder to run angular-cli and changing fs.notify.max_user_watches didn't work for me. As I found here: https://github.com/webpack/webpack-dev-server/issues/155#issuecomment-159140735 one solution is to specify --watch-poll option for webpack-dev-server.
So when I change this line: https://github.com/angular/angular-cli/blob/master/packages/angular-cli/tasks/serve-webpack.ts#L83 to poll: true, the reloading starts to work. It's pretty slow though...
@dmikhaylov thanks dear, worked for me
//poll: config_1.CliConfig.fromProject().config.defaults.poll
poll: true
and for slow issue try increasing vb.memory to double the current value.
I have the same issue on MacOS X. It seems to be a problem with just ng server - whereas ng build --watch seems to function as expected.
ng --version Could not start watchman; falling back to NodeWatcher for file system events. Visit http://ember-cli.com/user-guide/#watchman for more info. angular-cli: 1.0.0-beta.19-3 node: 6.5.0 os: darwin x64
I did notice something that may be a hint. It seems the outDir is being deleted and recreated. If I stay in the outDir and monitor the contents of main.bundle.js after a rebuild the directory is empty. If I cd up and back into the outDir the files have been recreated, but the contents are not correct - main.bundle.js does not contain the change that I made.
With ng build --watch I do not experience the same behavior. After a rebuild the outDir contents have been recreated, but not the directory itself. The directory continues to be valid and the contents reflect the change made.
It seems that there are 2 different things going on there ... but thought the additional info may help.
I had the same problem. I fixed it by simply moving the folder. it was in my "Dropbox (Personal)" folder before. I suspect the reload is tripping over the parentheses.
Thanks to @dmikhaylov , for Vagrant users, adding "poll":true in angular.cli.json file fixed the issue for me.
I had the same problem with sub-modules. I guess it has to do with special symbols in path name.
Changing dir name from mf-tracker to mfTracker worked for me.
For watching changed files I confirm that setting a higher max_user_watches for inotify worked for me. It was 8k by default. It now rebuilds the bundles on file save.
However, I'm serving my website using Apache 2.4.25. The website reload functionality not working. Is it something that only "ng serve" does?
Same issue, Angular CLI : 1.0.0-beta.28.3 Node: 7.5.0 OS : Win32 x64
No spaces to app .. here's the path : c:\dev\myapp
I reinstalled node and angular a couple of time but nothing worked.
Same issue after installing to latest CLI.
Angular CLI : 1.0.0-beta.28.3 Node: 7.5.0 OS : Win10 x64
No spaces in path.
Same issue here.
Angular-cli: 1.0.0-beta.28.3 node: 7.0.0 Os: Win10 x64
I reinstalled angular-cli in local and global also npm cache clean but didn't work. path is ok as well.
Same here, Angular-cli 1.0.0-beta.28.3, node: 6.5.0 Os: Win7 x64
Same issue after install beta.28.3 Os: Windows 10 x64
the problem is the new version the @ngtools/webpack i solved it go back to beta26 and @ngtools/[email protected]
this command npm install --save @ngtools/[email protected]
maybe work in beta 28
thanks @miguelcaravantes, that worked for me.
Thanks @miguelcaravantes that worked for me too.
Thanks @miguelcaravantes that worked for me too.
Thanks @miguelcaravantes that worked for me too.
Same problem here guys:
ng --version
angular-cli: 1.0.0-beta.28.3
node: 7.4.0
os: darwin x64