I had the same issue locally with an Angular 17 project on Windows when running @angular-devkit/build-angular:browser-esbuild
(not the :application
builder)
I did not expect this to work (because I am not aware of using any symlinks!), but adding the following fixed it:
architect/build/options:{"preserveSymlinks": true }
Source: https://forum.ionicframework.com/t/error-updated-angular-to-version-17-when-i-compile/237632/2