I'm updating Angular 11 to 12, angular core is updated. After updating "@angular-builders/custom-webpack" from 11 to 12 I'm getting error on ng serve command:
An unhandled exception occurred: Cannot find module 'webpack'
(which should be added by angular-cli, as far as I understand):
In latest angular versions the webpack dependency is manager by the CLI and you shouldn’t have a webpack entry in your package.json at all.
I tried removing node_modules and cleaning cache, but still, the problem is there. I also see many people suggest removing package-lock.json, but having this first comment by kevlarr in another thread: https://stackoverflow.com/a/51868816/5841925 I'm not sure it's a good idea to remove lock file. Does anyone have an idea how to solve it?