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

Interactive setup runs with no output

Open evwilkin opened this issue 1 year ago • 6 comments

Please provide:

We have a monorepo with several packages, but after running npx figma connect from both the root of the project as well as the root of the package containing the components (packages/react-core) we provide all the requested information, wait a minute while the command executes, and then it completes but no mappings are found or files created. Using npx figma create connect ... in each individual component directly to link it directly to a component/component set in the Figma file does work so we have been using that, but would prefer to take advantage of the automation if possible.

evwilkin avatar Dec 10 '24 21:12 evwilkin

Hey @evwilkin just to clarify, is the command you're trying to run npx figma connect (and not npx figma create)? E.g are you able to go through the wizard flow for connecting components, but no files are created?

karlpetersson avatar Dec 12 '24 14:12 karlpetersson

Yes sorry about the typo! Correcting the original description now to reflect this

evwilkin avatar Dec 12 '24 14:12 evwilkin

Hey @evwilkin! Thanks for the report. Please could you share either a screenshot or copy/paste the last bit of output of the CLI with the interactive setup? I cloned your repo and was able to complete the setup from packages/react-core, so would be helpful to know exactly which step is the problem. A couple more things to try:

  • You can pass --verbose to see more detailed errors - though not sure this'll surface anything new
  • We fixed a very similar bug a couple weeks ago in the last release (v1.2.4). It looks like you're on this anyway but worth triple checking as it sounds very similar!

slees-figma avatar Dec 16 '24 11:12 slees-figma

Thanks for taking a look @slees-figma - here are two screenshots, the first run from the /react-core directory and the second from the same dir but passing ./src/components as the components directory, both with the same effect (I did confirm the v1.2.4 version seen in the first screenshot)


Screenshot 2024-12-16 at 2 17 29 PM
Screenshot 2024-12-16 at 2 18 35 PM

evwilkin avatar Dec 16 '24 19:12 evwilkin

Also with the --verbose flag - I will note that initial run with this command without specifying the ./src/components directory did give a warning about a file in src/demos/... (Parsing local files...Could not parse exports of file...):


Screenshot 2024-12-16 at 2 24 46 PM

evwilkin avatar Dec 16 '24 19:12 evwilkin

Thanks @evwilkin. Looking at the code there is an error being thrown in parsing the response of the Figma file but I can't tell what it would be. I've asked for file access via your support ticket so I can investigate further.

slees-figma avatar Dec 17 '24 10:12 slees-figma