BuilderIO / figma-html

Builder.io for Figma: AI generation, export to code, import from web
https://www.figma.com/community/plugin/747985167520967365
MIT License
3.11k stars 287 forks source link

Cant generate JSON from localhost address #85

Open Webrow opened 2 years ago

Webrow commented 2 years ago

As I am developping locally Id like sometimes like to export designs from there. When I click the plugin, no "Download" is started, or JSON is created. (it works on other pages). Any debug I can check or look into?

steve8708 commented 2 years ago

Hey @Webrow - are you using the figma plugin or the chrome extension to grab your content from localhost?

Webrow commented 2 years ago

Yes correct! I installed the chrome extension, go to local served host and try to export it, but no JSON is being generated (no download triggered and no tab)

Webrow commented 2 years ago

@steve8708 Not to bump, but is there any debugging you'd like me to do to look into this?

steve8708 commented 2 years ago

Yeah, two things I'd love to find out

bradleytaftsmith commented 2 years ago

hey @steve8708 I'm also running into the same behavior.

I get no output on JS console on chrometools (short video here) I was unable to get the file shown there served simply using ngrok and didn't have time to troubleshoot it. getting the HTML I'm wanting into Figma hosted somewhere is a bit more than this is worth.

Hope this helps troubleshooting! I'd love to be able to import local HTML files for this work project, will continue to look for a work around.

bradleytaftsmith commented 2 years ago

I was able to work around the problem above by using npm http-server to serve my HTML page I wanted captured locally. I used homebrew to install npm, npm to install http-server, a http-server to serve the file to my browser. Then figma-html was able to handle it and export json as expected.