3

After updating to Ionic 6.0.5 / Angular 13.2.2 I have a problem to which I can't find a solution. In the development environment with ionic serve, a recompile is started periodically without anything having changed.

In the browser console it says:

[webpack-dev-server] App updated. Recompiling...
[webpack-dev-server] Nothing changed.
[webpack-dev-server] App updated. Recompiling...
[webpack-dev-server] Nothing changed.
[webpack-dev-server] App updated. Recompiling...
[webpack-dev-server] Nothing changed.
...

Initially the recompile starts every few minutes. However, it looks like the recompile calls then become more frequent the longer the dev server runs.

Has anyone had the same problem? Any tips on what else I could try?

Already tried:

  • node_modules deleted
  • deleted package-lock.json
  • run npm install again

ionic serve --verbose output on recompile:

[ng] <t> [webpack.cache.PackFileCacheStrategy] restore cache container: 14.200537 ms
[ng] <t> [webpack.cache.PackFileCacheStrategy] check build dependencies: 0.147219 ms
[ng] <t> [webpack.cache.PackFileCacheStrategy] restore cache content metadata: 90.696713 ms
[ng] [webpack.cache.PackFileCacheStrategy] Pack got invalid because of write to: ProgressPlugin|counts
[ng] [webpack.cache.PackFileCacheStrategy] Storing pack...
[ng] [webpack.cache.PackFileCacheStrategy] 1 fresh items in cache put into pack 3

-> so the process seems to be triggered somewhere in Webpack ProgressPlugin|counts. There is also this ticket about this: https://github.com/webpack/webpack/issues/14946 This is in turn linked in an Angular Cli ticket, but it should be resolved by now: https://github.com/angular/angular-cli/issues/22323

I don't understand what is going wrong in my development environment. Does no one else have this problem?

Thanks for your help and advice!

Sebiworld
  • 101
  • 1
  • 4
  • I have this problem too, did you find a solution? – Dejan S Feb 26 '23 at 08:02
  • @DejanS Not really. Setting a different path for the angular cache directory seems to help a little bit. I have set cli.cache.path to "../.cache" in my angular.json. But the main issue seems to be a bug in Angular's code. I am watching this thread, but its not solved yet: https://github.com/angular/angular/issues/47455 – Sebiworld Feb 27 '23 at 09:42
  • Ok thanks, I think I found the error on my part. The problem seams to have been in the tailwind.config.js since im using tailwind in my project. I had incorrectly set the: content: [ './**/*.{html,js}', ], this was checking all the dirs in my project. I changed it to content: [ './src/**/*.{html,ts}', ], and now it seams to have solved the problem and no more unwanted recompiling. – Dejan S Feb 27 '23 at 10:35

0 Answers0