How to make async call to the figma.getNodeByIdAsync() function? – Ask the community


Greetings from a newbie!

I cannot get a call to Figma.getNodeByIdAsync() to work. Could anyone please tell me what I am doing wrong? I have searched this forum and referred to a sample plugin go-to that uses this function, but I am still stuck.

Below is my simplified code just for checking this functionality. When I run it as part of the plugin, console logs #1 and #2 are generated but not #3, and the console returns to the ‘>’ prompt.

Thank you!

Figma_plugin_issue

Is there a call to figma.closePlugin() after the 100th line?

Thanks, yes, there is. (I have some commented-out code sitting around, so I didn’t post the full program.)

The commented lines should not affect further execution of the code. Make sure that figma.closePlugin() is called only after the promise is completed or try deleting/commenting everything except what is in the screenshot and compiling the code.



Source link

Leave a Comment