I could only find one similar query and it was auto-closed with no answers. I have cloned a library and I’m swapping a file to that library so I can test component changes non-destructively.
It is a straight clone, no changes at all have yet been made. Not to naming, position, theme, anything.
Several components are not found after swapping the library. I can find them myself in the file, they exist and are named as expected, but the built in swap insists they do not.
This is clearly a bug, has anyone found a way around it?
@Ish we have the same problem too. We have several big libraries and after using the swap feature a lot of times without issue now is not working at all. It only appears to work in new libraries so we hope that this bug gets fixed soon cause is breaking our workflow completely. Please @Figma_Support can we get some support here.
Hi @Ish ! I have exactly the same problem. I am working on a large system and this error is affecting my work considerably. I’m pretty sure this is a bug. @Figma_Support could you help in some way?
Update as I discovered what the cause is, at least for my issue.
My library contains unpublished local components. These are commonly base components for a set of variants (to allow quick updates across the set) or components that form part of a larger component that I do not want to be available on their own. I predominately do this for ease of maintenance, particularly where large sets of variants are concerned, and to keep the library “clean” for the people using it.
If a user detaches an instance with an unpublished component in it, and you are subsequently trying to use the built in swap library feature on that file, these unpublished components will not be found.
I had tickets open for this with the Figma team, and I was told it will be considered a bug but tbh it didn’t sound like they considered it a big deal.
I believe it is a bug because whilst it makes sense that users should not be able to select an unpublished component when using a library, it doesn’t make sense that unpublished components should not be matched when swapping from one library to another (assuming they exist in both libraries etcetc).
In my use case we were using a clone or our core component library to test large changes non-destructively. It is the type of thing the branches feature might one day be suitable for, but absolutely wasn’t last time I checked.
@Ish thanks a lot for the update. In my case is different cause we are not using unpublished components and in the past, the swapping was working perfectly. Now the swapping is not working even with the files and libraries that used to work. It has only worked when creating a completely new library from scratch with only a couple of components and styles, that were created just to test if the swapping works. Apart from that case is not working in any other library.
Hi @javier.ortiz did you find a solution for this? I think I’m having this exact same problem, the swap libraries has worked but now I keep trying and it simply won’t update a lot of my components to the new library style… I don’t know what to do!
Hi @Maria50, unfortunately, we didn´t find a proper way to make the swapping work again, so our solution was to use the Design System Organizer plugin (Design System Organizer | Figma Community) instead of the swapping and it is working fine for us. Is a paid plugin but it has a lot of functionalities (even more than the standard swapping) so I think is worth the price.
This solved it for me, maybe this might help you as well. When I check i found that I had conflicting variants and when I managed to get rid of the conflict the component started to show up while swapping.
Thanks for bringing this to our attention. If you encounter this unexpected behavior again, could you please file a bug report following the guide below?