Skip to main content
William_Deng
June 27, 2023
Question

Styles-to-variables error

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 replies.

8 replies

tank666
June 27, 2023

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

UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank
William_Deng
June 27, 2023

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

tank666
June 27, 2023

Do your style names contain the special characters mentioned above?

UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank
William_Deng
June 27, 2023

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
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.

UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank
William_Deng
June 27, 2023

Is there another one/better one?

tank666
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.

UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank
William_Deng
June 28, 2023

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