Skip to main content
Solved

'Frame' Reference Error

  • December 29, 2022
  • 2 replies
  • 851 views

Sandy_Goldscheider

Hi everyone,
I was dabbling around with the widget API and encounter an error I can’t resolve.
The error is the following : “figma_app.min.js.br:5 ReferenceError: ‘Frame’ is not defined” which correspond to this error within typescript: " error TS2693: ‘Frame’ only refers to a type, but is being used as a value here.".
Frame is the only one causing issues (other types are working fine). I’ve stripped it down to the bear minimum to test it with no success. As anyone any idea ?

<Frame
  name="Vote +"
  fill="#FFF"
  cornerRadius={16}
  width={16}
  height={16}
>

Best answer by tank666

Have you declared the Frame component as a constant?

const {widget} = figma;
const {Frame} = widget;
View original

2 replies

tank666
  • 4873 replies
  • Answer
  • December 29, 2022

Have you declared the Frame component as a constant?

const {widget} = figma;
const {Frame} = widget;

Sandy_Goldscheider

haaaa ! Thanks, every other references were automatically added, so I didn’t paid attention to this.


Reply


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