[GH-ISSUE #1395] Error with ESBuild when using flag-icons #623

Open
opened 2026-03-03 14:39:48 +03:00 by kerem · 6 comments
Owner

Originally created by @sshanmu91 on GitHub (Aug 22, 2025).
Original GitHub issue: https://github.com/lipis/flag-icons/issues/1395

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
Originally created by @sshanmu91 on GitHub (Aug 22, 2025). Original GitHub issue: https://github.com/lipis/flag-icons/issues/1395 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") <img width="1610" height="477" alt="Image" src="https://github.com/user-attachments/assets/32e481cd-f7e6-466d-b4af-df2c1bc8dd2d" />
Author
Owner

@john8329 commented on GitHub (Aug 23, 2025):

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
<!-- gh-comment-id:3216794652 --> @john8329 commented on GitHub (Aug 23, 2025): 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 ```
Author
Owner

@john8329 commented on GitHub (Aug 23, 2025):

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";
<!-- gh-comment-id:3216807967 --> @john8329 commented on GitHub (Aug 23, 2025): A workaround by the way: ```sass @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"; ```
Author
Owner

@sshanmu91 commented on GitHub (Aug 25, 2025):

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

<!-- gh-comment-id:3220511449 --> @sshanmu91 commented on GitHub (Aug 25, 2025): @john8329 Thanks much for the Suggestion. It resolves the Build Issue.
Author
Owner

@NotTsunami commented on GitHub (Sep 23, 2025):

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

<!-- gh-comment-id:3324307053 --> @NotTsunami commented on GitHub (Sep 23, 2025): 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
Author
Owner

@DungDD10 commented on GitHub (Jan 16, 2026):

Hi @john8329 , where should i add the your trick?

<!-- gh-comment-id:3758753323 --> @DungDD10 commented on GitHub (Jan 16, 2026): Hi @john8329 , where should i add the your trick?
Author
Owner

@john8329 commented on GitHub (Jan 16, 2026):

Hi @john8329 , where should i add the your trick?

In your main.scss or anywhere in your import tree for the main stylesheet.

<!-- gh-comment-id:3758763164 --> @john8329 commented on GitHub (Jan 16, 2026): > Hi [@john8329](https://github.com/john8329) , where should i add the your trick? In your `main.scss` or anywhere in your import tree for the main stylesheet.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/flag-icons#623
No description provided.