figma-html icon indicating copy to clipboard operation
figma-html copied to clipboard

Cant generate JSON from localhost address

Open Webrow opened this issue 3 years ago • 6 comments

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?

Webrow avatar Nov 03 '21 10:11 Webrow

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

steve8708 avatar Nov 03 '21 14:11 steve8708

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 avatar Nov 03 '21 14:11 Webrow

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

Webrow avatar Nov 18 '21 12:11 Webrow

Yeah, two things I'd love to find out

  • do you get any errors in the chrome devtools JS console? if so can you share?
  • if you something like ngrok to make the host no longer localhost, does importing work?

steve8708 avatar Nov 22 '21 18:11 steve8708

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 avatar Aug 02 '22 19:08 bradleytaftsmith

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.

bradleytaftsmith avatar Aug 06 '22 12:08 bradleytaftsmith