Been searching online and not able to hunt down the reason or solution for this error? Anyone can help. Here is my code:
figma
.createImageAsync(prop.url)
.then(async (image: Image) => {
const { width, height } = await image.getSizeAsync()
rect.resize(width, height)
// Set the fill on the rect
rect.fills = [
{
type: 'IMAGE',
imageHash: image.hash,
scaleMode: 'FILL'
}
]
//send message to ui to change button label
console.log('IMAGE MADE!!')
figma.ui.postMessage({
type: 'image-made',
message: 'Make another'
})