flag-icons icon indicating copy to clipboard operation
flag-icons copied to clipboard

Error with ESBuild when using flag-icons

Open sshanmu91 opened this issue 4 months ago • 4 comments

When on upgrading from Angular v17 to v18, using flag-icons Library, We are getting the Error during the Build.

(Even when outputHasing = "all" / "media")

Image

sshanmu91 avatar Aug 22 '25 17:08 sshanmu91

Having the same issue, I'll paste it to make it indexed in search engines:

Two output files share the same path but have different contents: media/xx.svg
✘ [ERROR] Two output files share the same path but have different contents: media/ad.svg
✘ [ERROR] Two output files share the same path but have different contents: media/ae.svg

john8329 avatar Aug 23 '25 11:08 john8329

A workaround by the way:

@forward "../node_modules/flag-icons/sass/variables" with (
  $flag-icons-use-square: false,
);
@use "../node_modules/flag-icons/sass/flag-icons-base";
@use "../node_modules/flag-icons/sass/flag-icons-list";

john8329 avatar Aug 23 '25 12:08 john8329

@john8329 Thanks much for the Suggestion. It resolves the Build Issue.

sshanmu91 avatar Aug 25 '25 14:08 sshanmu91

Angular is such a pain...it's been causing issues since day 1. At some point in the near future I might make a minimal repo to link to as an example and just update it every major version

NotTsunami avatar Sep 23 '25 14:09 NotTsunami