How to fix Angular & flag-icons: Two output files share the same path but have different contents: media/...svg
Problem
You are using the flag-icons package in your Angular app, and you get the following error when building your app using ng build or ng serve:
Solution
This only affects a development build, since the development build, by default, only has outputHashing: "none".
Therefore, add outputHashing: "media" to your development build options in angular.json. You can also set outputHashing: "all" if you want to hash all files, but I recommend to use outputHashing: "media" for development builds.
This is what your development build options should look like:
Don’t forget to add the comma at the end of the line before the new line.
Original source: GitHub issue tracker for flag-icons
Check out similar posts by category:
Angular
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow