Closed noire-munich closed 4 weeks ago
Hey @noire-munich
The issue here is:
props: {text: 'Demonstration from wyylde local.'},
The values in the props
object need to be figma.<type>
calls, e.g. figma.string
(we call these intrinsics), see here for more information.
The error message here is not great, sorry about that - we are planning to improve our error messages!
You need to have something which links to a property of your Figma component, e.g.:
props: { text: figma.string("Label") }
which would pull in the "Label" property from Figma.
If you want to insert a static string, you need to put it in your example:
example: (props) => <Demo {...props} text="my text here" />
Let us know if you need more help getting set up!
Thanks @tomduncalf-figma , that's it indeed. It got me confused, first time I'm using component properties and indeed the message is not clear.
I can move forward but here's my next block:
Failed to upload to Figma (ERR_BAD_REQUEST): 403 Invalid scope(s): Please ensure that you have selected both the File Read scope and the Code Connect Write scope when generating the token.
Could be helpful to remind in the message that Code Connect is available only on Organization & Enterprise plans đđ»
I've followed the instructions to install Code Connect for a React codebase. To try it out I have created one component
Demo
and its related figma file.Whenever I try to publish I get at least this error:
And usually I get errors related to "unknown intrinsic", such as:
The
No Code Connect files found in
error doesn't make sense if the cli throws on one file such as this example.Also here's the figma file, which I've kept extremely simple:
figma.config.json
I'm willing to set up a call with a maintainer to check this out, I am trying Code Connect to see if we will use it at our company for our next DS.
Here's my conf: OS: mac npx: 8.19.3 node: v16.19.0