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 I have the same issue and i can’t find the answer.
This post seams to be identical Styles not found when swapping identical libraries
@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.