Skip to main content
Question

Styles-to-variables error


William_Deng

This is the first time I run it and I get this error:

Screenshot 2023-06-27 at 11.59.15

Console view:

Screenshot 2023-06-27 at 11.59.21

This topic has been closed for comments

8 replies

tank666
  • 4871 replies
  • June 27, 2023

What name are you trying to create the variable with? Does it contain special characters?


William_Deng

Im not able to enter a name. I just click “Run” on the plugin and I get this error.


tank666
  • 4871 replies
  • June 27, 2023

Do your style names contain the special characters mentioned above?


William_Deng

Yes I’m in Fintech so we use $ a lot.

I replaced these with USD and it works.

thank you @tank666

PS Do you know how we might contribute and add some docs to this plugin? Its very useful but the UX is poor. For example I didn’t know it had worked so I kept trying it. It turns out now I have 15 collections of tokens. All we needed was a success notification.


tank666
  • 4871 replies
  • June 27, 2023

It looks like you used the sample plugin from here: plugin-samples/styles-to-variables at master · figma/plugin-samples · GitHub

Create a new issue (bugs, ideas) in this repository for the creators to consider.


William_Deng

Is there another one/better one?


tank666
  • 4871 replies
  • June 27, 2023

Do you mean plugin? I don’t know. I suggest you look for a plugin that suits your requirements in Figma Community.


William_Deng

This was the best plugin I think for converting styles to variables


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings