code-connect icon indicating copy to clipboard operation
code-connect copied to clipboard

Can't connect Figma component because "this component already has a local code connect file"

Open mijnnaamisramon opened this issue 10 months ago • 1 comments

  • Code Connect CLI version: 1.3.2
  • Operating system: Windows

When using npx figma connect it correctly(!) finds two versions of the component in Figma: Button and .button. The first one I can map to the correct React component.... I also want to map the other version to the same component, but it says I can't because "this component already has a local code connect file". But I can't find any file connected with .button anywhere.

Maybe I'm going the wrong way about this, because the Figma Button component is a parent of .button. But somehow code connect only works with .button... when I click Button I can't see code connect. I also tried the nested properties (childProps and nestedProps) but I can't seem to get it to work. Any idea what I'm doing wrong?

mijnnaamisramon avatar Apr 10 '25 09:04 mijnnaamisramon

Hey @mijnnaamisramon - could you provide the Code Connect file(s) that you're trying to publish here?

Can you provide any more info about how the Button in figma is setup - is Button a component set? If so, we only display CC on the individual variants, not when clicking the component set node itself (though the parent is what you should be connecting, not the variant)

karlpetersson avatar May 02 '25 15:05 karlpetersson