This problem was reported and supposedly fixed back in '14. The IDE creates multiple copies of library files added to an app. Will not compile - gets totally confused. It appears to be the exact same problem as these:
Hi, in case it’s of your interest, I demonstrate how to use particle CLI to build locally with Visual Studio Code in this Hackster article.
Hope it helps,
Gustavo.
I used to have that happen occasionally but not recently (heeding Dave's advice bellow), so I thought that has been fixes.
On the other hand, new bug-fixes for the current Web IDE won't happen anymore (I think) since development of IDEs 2.0 is buzzing along on high priority behind the scenes.
And you also had a reply of @Dave on your other post regarding this issue
It has its moments. I think I figured out its quirks. It took some trial and error. The VS approach is appealing and takes a little work. IDE 2.0 sounds like a plan to me to minimize work overall.